@gitlab/ui 49.0.0 → 49.0.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 (131) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/base/accordion/accordion.js +2 -8
  3. package/dist/components/base/accordion/accordion_item.js +0 -14
  4. package/dist/components/base/alert/alert.js +4 -22
  5. package/dist/components/base/avatar/avatar.js +0 -7
  6. package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -2
  7. package/dist/components/base/avatars_inline/avatars_inline.js +2 -10
  8. package/dist/components/base/badge/badge.js +0 -8
  9. package/dist/components/base/banner/banner.js +0 -10
  10. package/dist/components/base/breadcrumb/breadcrumb.js +0 -12
  11. package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -2
  12. package/dist/components/base/broadcast_message/broadcast_message.js +0 -3
  13. package/dist/components/base/button/button.js +0 -11
  14. package/dist/components/base/card/card.js +1 -2
  15. package/dist/components/base/datepicker/datepicker.js +7 -42
  16. package/dist/components/base/daterange_picker/daterange_picker.js +0 -23
  17. package/dist/components/base/drawer/drawer.js +0 -13
  18. package/dist/components/base/dropdown/dropdown.js +3 -17
  19. package/dist/components/base/dropdown/dropdown_item.js +2 -8
  20. package/dist/components/base/filtered_search/common_story_options.js +1 -2
  21. package/dist/components/base/filtered_search/filtered_search.js +9 -61
  22. package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -6
  23. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -16
  24. package/dist/components/base/filtered_search/filtered_search_term.js +0 -9
  25. package/dist/components/base/filtered_search/filtered_search_token.js +10 -49
  26. package/dist/components/base/filtered_search/filtered_search_token_segment.js +3 -56
  27. package/dist/components/base/filtered_search/filtered_search_utils.js +7 -24
  28. package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -2
  29. package/dist/components/base/form/form_checkbox_tree/checkbox_tree_node.js +0 -4
  30. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.js +0 -10
  31. package/dist/components/base/form/form_checkbox_tree/models/node.js +1 -10
  32. package/dist/components/base/form/form_checkbox_tree/models/tree.js +16 -37
  33. package/dist/components/base/form/form_combobox/form_combobox.js +2 -36
  34. package/dist/components/base/form/form_group/form_group.js +2 -7
  35. package/dist/components/base/form/form_input/form_input.js +2 -8
  36. package/dist/components/base/form/form_input_group/form_input_group.js +0 -5
  37. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -8
  38. package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -2
  39. package/dist/components/base/form/form_select/form_select.js +0 -3
  40. package/dist/components/base/form/form_textarea/form_textarea.js +2 -7
  41. package/dist/components/base/icon/icon.js +4 -14
  42. package/dist/components/base/infinite_scroll/infinite_scroll.js +7 -21
  43. package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -9
  44. package/dist/components/base/label/label.js +0 -12
  45. package/dist/components/base/loading_icon/loading_icon.js +7 -10
  46. package/dist/components/base/markdown/markdown.js +1 -0
  47. package/dist/components/base/modal/modal.js +7 -27
  48. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +14 -34
  49. package/dist/components/base/new_dropdowns/constants.js +4 -2
  50. package/dist/components/base/new_dropdowns/listbox/listbox.js +14 -81
  51. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -2
  52. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -5
  53. package/dist/components/base/new_dropdowns/listbox/utils.js +0 -7
  54. package/dist/components/base/paginated_list/paginated_list.js +0 -15
  55. package/dist/components/base/pagination/pagination.js +14 -72
  56. package/dist/components/base/path/path.js +0 -29
  57. package/dist/components/base/popover/popover.js +0 -5
  58. package/dist/components/base/search_box_by_click/search_box_by_click.js +1 -26
  59. package/dist/components/base/search_box_by_type/search_box_by_type.js +2 -12
  60. package/dist/components/base/segmented_control/segmented_control.js +0 -10
  61. package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -19
  62. package/dist/components/base/skeleton_loading/skeleton_loading.js +0 -3
  63. package/dist/components/base/sorting/sorting.js +1 -9
  64. package/dist/components/base/sorting/sorting_item.js +4 -6
  65. package/dist/components/base/table/table.js +0 -4
  66. package/dist/components/base/tabs/tab/tab.js +2 -6
  67. package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -21
  68. package/dist/components/base/tabs/tabs/tabs.js +8 -33
  69. package/dist/components/base/toast/toast.js +3 -15
  70. package/dist/components/base/toggle/toggle.js +0 -18
  71. package/dist/components/base/token/token.js +0 -4
  72. package/dist/components/base/token_selector/token_container.js +0 -24
  73. package/dist/components/base/token_selector/token_selector.js +10 -61
  74. package/dist/components/base/token_selector/token_selector_dropdown.js +4 -32
  75. package/dist/components/charts/area/area.js +8 -32
  76. package/dist/components/charts/bar/bar.js +7 -19
  77. package/dist/components/charts/chart/chart.js +1 -22
  78. package/dist/components/charts/column/column.js +8 -18
  79. package/dist/components/charts/discrete_scatter/discrete_scatter.js +2 -13
  80. package/dist/components/charts/gauge/gauge.js +0 -15
  81. package/dist/components/charts/heatmap/heatmap.js +3 -16
  82. package/dist/components/charts/legend/legend.js +2 -24
  83. package/dist/components/charts/line/line.js +8 -34
  84. package/dist/components/charts/series_label/series_label.js +0 -12
  85. package/dist/components/charts/single_stat/single_stat.js +0 -8
  86. package/dist/components/charts/sparkline/sparkline.js +1 -16
  87. package/dist/components/charts/stacked_column/stacked_column.js +8 -26
  88. package/dist/components/charts/tooltip/tooltip.js +0 -6
  89. package/dist/components/mixins/button_mixin.js +0 -1
  90. package/dist/components/mixins/safe_link_mixin.js +0 -1
  91. package/dist/components/mixins/toolbox_mixin.js +0 -1
  92. package/dist/components/mixins/tooltip_mixin.js +1 -2
  93. package/dist/components/regions/empty_state/empty_state.js +0 -12
  94. package/dist/components/utilities/animated_number/animated_number.js +0 -16
  95. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -3
  96. package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -7
  97. package/dist/components/utilities/intersperse/intersperse.js +3 -9
  98. package/dist/components/utilities/sprintf/sprintf.js +9 -23
  99. package/dist/components/utilities/truncate/truncate.js +0 -10
  100. package/dist/config.js +3 -4
  101. package/dist/directives/hover_load/hover_load.js +2 -8
  102. package/dist/directives/outside/get_event_like_time_stamp.js +4 -2
  103. package/dist/directives/outside/outside.js +5 -20
  104. package/dist/directives/resize_observer/resize_observer.js +0 -10
  105. package/dist/directives/safe_html/safe_html.js +5 -6
  106. package/dist/directives/safe_link/mock_data.js +1 -1
  107. package/dist/directives/safe_link/safe_link.js +0 -13
  108. package/dist/utils/breakpoints.js +0 -3
  109. package/dist/utils/charts/config.js +29 -42
  110. package/dist/utils/charts/constants.js +8 -8
  111. package/dist/utils/charts/mock_data.js +2 -2
  112. package/dist/utils/charts/story_config.js +1 -1
  113. package/dist/utils/charts/theme.js +1 -3
  114. package/dist/utils/charts/utils.js +2 -6
  115. package/dist/utils/constants.js +10 -7
  116. package/dist/utils/data_utils.js +5 -4
  117. package/dist/utils/datetime_utility.js +4 -4
  118. package/dist/utils/number_utils.js +7 -11
  119. package/dist/utils/stories_utils.js +1 -1
  120. package/dist/utils/story_decorators/container.js +0 -1
  121. package/dist/utils/string_utils.js +0 -14
  122. package/dist/utils/test_utils.js +3 -2
  123. package/dist/utils/use_fake_date.js +0 -4
  124. package/dist/utils/use_mock_intersection_observer.js +4 -19
  125. package/dist/utils/utils.js +5 -14
  126. package/package.json +3 -3
  127. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.spec.js +1 -0
  128. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +13 -7
  129. package/src/components/base/new_dropdowns/listbox/listbox.spec.js +13 -7
  130. package/src/components/base/new_dropdowns/listbox/listbox.vue +12 -16
  131. package/src/components/base/pagination/pagination.vue +2 -2
@@ -36,7 +36,6 @@ var script = {
36
36
  // so we should not force any specific type for value here
37
37
  validator: () => true
38
38
  },
39
-
40
39
  /**
41
40
  * If provided, used as history items for this component
42
41
  */
@@ -45,7 +44,6 @@ var script = {
45
44
  required: false,
46
45
  default: null
47
46
  },
48
-
49
47
  /**
50
48
  * If provided, used as a placeholder for this component
51
49
  */
@@ -59,7 +57,6 @@ var script = {
59
57
  required: false,
60
58
  default: true
61
59
  },
62
-
63
60
  /**
64
61
  * If provided and true, disables the input and controls
65
62
  */
@@ -68,7 +65,6 @@ var script = {
68
65
  required: false,
69
66
  default: false
70
67
  },
71
-
72
68
  /**
73
69
  * i18n for recent searches title within history dropdown
74
70
  */
@@ -77,7 +73,6 @@ var script = {
77
73
  required: false,
78
74
  default: 'Recent searches'
79
75
  },
80
-
81
76
  /**
82
77
  * i18n for clear button title
83
78
  */
@@ -86,7 +81,6 @@ var script = {
86
81
  required: false,
87
82
  default: 'Clear'
88
83
  },
89
-
90
84
  /**
91
85
  * i18n for close button title within history dropdown
92
86
  */
@@ -95,7 +89,6 @@ var script = {
95
89
  required: false,
96
90
  default: 'Close'
97
91
  },
98
-
99
92
  /**
100
93
  * i18n for recent searches clear text
101
94
  */
@@ -109,7 +102,6 @@ var script = {
109
102
  required: false,
110
103
  default: "You don't have any recent searches"
111
104
  },
112
-
113
105
  /**
114
106
  * Container for tooltip. Valid values: DOM node, selector string or `false` for default
115
107
  */
@@ -118,7 +110,6 @@ var script = {
118
110
  default: false,
119
111
  validator: value => value === false || typeof value === 'string' || value instanceof HTMLElement
120
112
  },
121
-
122
113
  /**
123
114
  * HTML attributes to add to the search button
124
115
  */
@@ -128,14 +119,12 @@ var script = {
128
119
  default: () => ({})
129
120
  }
130
121
  },
131
-
132
122
  data() {
133
123
  return {
134
124
  currentValue: null,
135
125
  isFocused: false
136
126
  };
137
127
  },
138
-
139
128
  computed: {
140
129
  inputAttributes() {
141
130
  const attributes = {
@@ -143,39 +132,31 @@ var script = {
143
132
  placeholder: this.placeholder,
144
133
  ...this.$attrs
145
134
  };
146
-
147
135
  if (!attributes['aria-label']) {
148
136
  attributes['aria-label'] = attributes.placeholder;
149
137
  }
150
-
151
138
  return attributes;
152
139
  },
153
-
154
140
  hasValue() {
155
141
  return Boolean(this.currentValue);
156
142
  }
157
-
158
143
  },
159
144
  watch: {
160
145
  value: {
161
146
  handler(newValue) {
162
147
  this.currentValue = newValue;
163
148
  },
164
-
165
149
  immediate: true
166
150
  },
167
-
168
151
  currentValue(newValue) {
169
152
  if (newValue === this.value) return;
170
153
  this.$emit('input', newValue);
171
154
  }
172
-
173
155
  },
174
156
  methods: {
175
157
  closeHistoryDropdown() {
176
158
  this.$refs.historyDropdown.hide();
177
159
  },
178
-
179
160
  search(value) {
180
161
  /**
181
162
  * Emitted when search is submitted
@@ -183,40 +164,34 @@ var script = {
183
164
  */
184
165
  this.$emit('submit', value);
185
166
  },
186
-
187
167
  selectHistoryItem(item) {
188
168
  this.currentValue = item;
169
+
189
170
  /**
190
171
  * Emitted when item from history is selected
191
172
  * @property {*} item History item
192
173
  */
193
-
194
174
  this.$emit('history-item-selected', item);
195
175
  setTimeout(() => {
196
176
  document.activeElement.blur();
197
177
  });
198
178
  },
199
-
200
179
  clearInput() {
201
180
  this.currentValue = '';
202
181
  /**
203
182
  * Emitted when search is cleared
204
183
  */
205
-
206
184
  this.$emit('clear');
207
-
208
185
  if (this.$refs.input) {
209
186
  this.$refs.input.$el.focus();
210
187
  }
211
188
  },
212
-
213
189
  emitClearHistory() {
214
190
  /**
215
191
  * Emitted when clear history button is clicked
216
192
  */
217
193
  this.$emit('clear-history');
218
194
  }
219
-
220
195
  }
221
196
  };
222
197
 
@@ -30,7 +30,6 @@ var script = {
30
30
  required: false,
31
31
  default: 'Clear'
32
32
  },
33
-
34
33
  /**
35
34
  * If provided and true, disables the input and controls
36
35
  */
@@ -39,7 +38,6 @@ var script = {
39
38
  required: false,
40
39
  default: false
41
40
  },
42
-
43
41
  /**
44
42
  * Puts search box into loading state, rendering spinner
45
43
  */
@@ -48,7 +46,6 @@ var script = {
48
46
  required: false,
49
47
  default: false
50
48
  },
51
-
52
49
  /**
53
50
  * Container for tooltip. Valid values: DOM node, selector string or `false` for default
54
51
  */
@@ -65,41 +62,34 @@ var script = {
65
62
  placeholder: 'Search',
66
63
  ...this.$attrs
67
64
  };
68
-
69
65
  if (!attributes['aria-label']) {
70
66
  attributes['aria-label'] = attributes.placeholder;
71
67
  }
72
-
73
68
  return attributes;
74
69
  },
75
-
76
70
  hasValue() {
77
71
  return Boolean(this.value.length);
78
72
  },
79
-
80
73
  inputListeners() {
81
- return { ...this.$listeners,
74
+ return {
75
+ ...this.$listeners,
82
76
  input: value => {
83
77
  this.$emit('input', value);
84
78
  }
85
79
  };
86
80
  },
87
-
88
81
  showClearButton() {
89
82
  return this.hasValue && !this.disabled;
90
83
  }
91
-
92
84
  },
93
85
  methods: {
94
86
  clearInput() {
95
87
  this.$emit('input', '');
96
88
  this.focusInput();
97
89
  },
98
-
99
90
  focusInput() {
100
91
  this.$refs.input.$el.focus();
101
92
  }
102
-
103
93
  }
104
94
  };
105
95
 
@@ -25,35 +25,28 @@ var script = {
25
25
  enabledOptions() {
26
26
  return this.options.filter(option => !option.disabled);
27
27
  }
28
-
29
28
  },
30
29
  watch: {
31
30
  checked: {
32
31
  handler(newValue, oldValue) {
33
32
  this.checkValue(newValue, oldValue);
34
33
  }
35
-
36
34
  },
37
35
  options: {
38
36
  handler() {
39
37
  this.checkValue(this.checked);
40
38
  }
41
-
42
39
  }
43
40
  },
44
-
45
41
  created() {
46
42
  this.checkValue(this.checked);
47
43
  },
48
-
49
44
  methods: {
50
45
  checkValue(newValue) {
51
46
  let oldValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
52
-
53
47
  if (!this.isValidValue(newValue)) {
54
48
  // eslint-disable-next-line no-console
55
49
  console.warn(genericErrorMessage);
56
-
57
50
  if (this.enabledOptions.length) {
58
51
  const suggestion = oldValue && this.isValidValue(oldValue) ? oldValue : this.enabledOptions[0].value;
59
52
  /**
@@ -61,12 +54,10 @@ var script = {
61
54
  * @event input
62
55
  * @argument checked The selected option
63
56
  */
64
-
65
57
  this.$emit('input', suggestion);
66
58
  }
67
59
  }
68
60
  },
69
-
70
61
  isValidValue(val) {
71
62
  return this.enabledOptions.some(_ref => {
72
63
  let {
@@ -75,7 +66,6 @@ var script = {
75
66
  return value === val;
76
67
  });
77
68
  }
78
-
79
69
  }
80
70
  };
81
71
 
@@ -21,7 +21,6 @@ var script = {
21
21
  default: null,
22
22
  required: false
23
23
  },
24
-
25
24
  /**
26
25
  * It will be set in the viewbox attr in the <svg />. Defaults to 130 when skeleton is passed via the slot.
27
26
  * Defaults to the combined height of the lines when default skeleton is used
@@ -31,7 +30,6 @@ var script = {
31
30
  default: null,
32
31
  required: false
33
32
  },
34
-
35
33
  /**
36
34
  * Aspect ratio option of <svg/>
37
35
  */
@@ -40,7 +38,6 @@ var script = {
40
38
  default: 'xMidYMid meet',
41
39
  required: false
42
40
  },
43
-
44
41
  /**
45
42
  * Required if you're using <base url="/" /> in your <head />. Defaults to an empty string.
46
43
  * This prop is common used as: <gl-skeleton-loader :base-url="$route.fullPath" /> which will fill the SVG attribute with the relative path.
@@ -50,7 +47,6 @@ var script = {
50
47
  default: '',
51
48
  required: false
52
49
  },
53
-
54
50
  /**
55
51
  * Defaults to unique id
56
52
  */
@@ -59,7 +55,6 @@ var script = {
59
55
  default: () => uid(),
60
56
  required: false
61
57
  },
62
-
63
58
  /**
64
59
  * Number of lines to show when using the default skeleton
65
60
  */
@@ -68,7 +63,6 @@ var script = {
68
63
  default: 3,
69
64
  required: false
70
65
  },
71
-
72
66
  /**
73
67
  * If the default skeleton lines should all be the same width
74
68
  */
@@ -78,41 +72,31 @@ var script = {
78
72
  required: false
79
73
  }
80
74
  },
81
-
82
75
  render(createElement, _ref) {
83
76
  let {
84
77
  props,
85
78
  slots
86
79
  } = _ref;
87
-
88
80
  const slotIsSet = () => slots().default;
89
-
90
81
  const propValueOrDefault = (name, defaultValue) => props[name] !== null ? props[name] : defaultValue;
91
-
92
82
  const width = () => {
93
83
  if (slotIsSet()) {
94
84
  return propValueOrDefault('width', DEFAULT_SVG_WIDTH);
95
85
  }
96
-
97
86
  return propValueOrDefault('width', DEFAULT_LINE_MAX_WIDTH);
98
87
  };
99
-
100
88
  const height = () => {
101
89
  if (slotIsSet()) {
102
90
  return propValueOrDefault('height', DEFAULT_SVG_HEIGHT);
103
91
  }
104
-
105
92
  return propValueOrDefault('height', props.lines * DEFAULT_LINE_HEIGHT + (props.lines - 1) * DEFAULT_LINE_SPACING);
106
93
  };
107
-
108
94
  const lineWidth = index => {
109
95
  if (props.equalWidthLines) {
110
96
  return '100%';
111
97
  }
112
-
113
98
  return `${DEFAULT_LINE_WIDTH_PERCENTAGES[index % DEFAULT_LINE_WIDTH_PERCENTAGES.length]}%`;
114
99
  };
115
-
116
100
  const svg = createElement('svg', {
117
101
  class: {
118
102
  'gl-skeleton-loader': true,
@@ -187,11 +171,9 @@ var script = {
187
171
  repeatCount: 'indefinite'
188
172
  }
189
173
  })])])])]);
190
-
191
174
  if (slotIsSet()) {
192
175
  return svg;
193
176
  }
194
-
195
177
  return createElement('div', {
196
178
  class: 'gl-skeleton-loader-default-container gl-max-w-full',
197
179
  style: {
@@ -200,7 +182,6 @@ var script = {
200
182
  }
201
183
  }, [svg]);
202
184
  }
203
-
204
185
  };
205
186
 
206
187
  /* script */
@@ -9,18 +9,15 @@ var script = {
9
9
  type: Number,
10
10
  required: false,
11
11
  default: 3,
12
-
13
12
  validator(value) {
14
13
  return value > 0 && value < 4;
15
14
  }
16
-
17
15
  }
18
16
  },
19
17
  computed: {
20
18
  lineClasses() {
21
19
  return new Array(this.lines).fill().map((_, i) => `skeleton-line-${i + 1}`);
22
20
  }
23
-
24
21
  }
25
22
  };
26
23
 
@@ -23,7 +23,6 @@ var script = {
23
23
  required: false,
24
24
  default: ''
25
25
  },
26
-
27
26
  /**
28
27
  * Determines the current sort order icon displayed.
29
28
  */
@@ -32,7 +31,6 @@ var script = {
32
31
  required: false,
33
32
  default: false
34
33
  },
35
-
36
34
  /**
37
35
  * The text of the tool tip for the sort direction toggle button.
38
36
  */
@@ -41,7 +39,6 @@ var script = {
41
39
  required: false,
42
40
  default: 'Sort direction'
43
41
  },
44
-
45
42
  /**
46
43
  * Additional class(es) to apply to the root element of the GlDropdown.
47
44
  */
@@ -50,7 +47,6 @@ var script = {
50
47
  required: false,
51
48
  default: ''
52
49
  },
53
-
54
50
  /**
55
51
  * Additional class(es) to apply to the dropdown toggle.
56
52
  */
@@ -59,7 +55,6 @@ var script = {
59
55
  required: false,
60
56
  default: ''
61
57
  },
62
-
63
58
  /**
64
59
  * Additional class(es) to apply to the sort direction toggle button.
65
60
  */
@@ -73,15 +68,14 @@ var script = {
73
68
  localSortDirection() {
74
69
  return this.isAscending ? 'sort-lowest' : 'sort-highest';
75
70
  },
76
-
77
71
  sortDirectionAriaLabel() {
78
72
  return this.isAscending ? 'Sorting Direction: Ascending' : 'Sorting Direction: Descending';
79
73
  }
80
-
81
74
  },
82
75
  methods: {
83
76
  toggleSortDirection() {
84
77
  const newDirection = !this.isAscending;
78
+
85
79
  /**
86
80
  * Emitted when the sort direction button is clicked.
87
81
  *
@@ -90,10 +84,8 @@ var script = {
90
84
  *
91
85
  * @property {boolean} isAscending
92
86
  */
93
-
94
87
  this.$emit('sortDirectionChange', newDirection);
95
88
  }
96
-
97
89
  }
98
90
  };
99
91
 
@@ -25,7 +25,6 @@ var script = {
25
25
  default: false,
26
26
  required: false
27
27
  },
28
-
29
28
  /**
30
29
  * If given, makes the item a link pointing to the given value. Otherwise,
31
30
  * the item is a button.
@@ -36,7 +35,6 @@ var script = {
36
35
  required: false
37
36
  }
38
37
  },
39
-
40
38
  /**
41
39
  * The content of the item.
42
40
  * @slot default
@@ -56,19 +54,19 @@ var script = {
56
54
  ariaLabel: 'Selected'
57
55
  }
58
56
  });
59
- return createElement(GlDropdownItem, { ...data,
60
- attrs: { ...props
57
+ return createElement(GlDropdownItem, {
58
+ ...data,
59
+ attrs: {
60
+ ...props
61
61
  },
62
62
  scopedSlots: {
63
63
  default: () => {
64
64
  var _scopedSlots$default;
65
-
66
65
  return [icon, (_scopedSlots$default = scopedSlots.default) === null || _scopedSlots$default === void 0 ? void 0 : _scopedSlots$default.call(scopedSlots)];
67
66
  }
68
67
  }
69
68
  });
70
69
  }
71
-
72
70
  };
73
71
 
74
72
  /* script */
@@ -4,7 +4,6 @@ import { tableFullProps, tableFullSlots, glTableLiteWarning } from './constants'
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
6
  //
7
-
8
7
  const shouldUseFullTable = _ref => {
9
8
  let {
10
9
  $attrs,
@@ -12,13 +11,11 @@ const shouldUseFullTable = _ref => {
12
11
  } = _ref;
13
12
  return tableFullProps.some(prop => $attrs[prop] !== undefined) || tableFullSlots.some(slot => $scopedSlots[slot] !== undefined);
14
13
  };
15
-
16
14
  var script = {
17
15
  components: {
18
16
  BTable
19
17
  },
20
18
  inheritAttrs: false,
21
-
22
19
  mounted() {
23
20
  // logWarning will call isDev before logging any message
24
21
  // this additional call to isDev is being made to exit the condition early when run in production
@@ -26,7 +23,6 @@ var script = {
26
23
  logWarning(glTableLiteWarning);
27
24
  }
28
25
  }
29
-
30
26
  };
31
27
 
32
28
  /* script */
@@ -15,7 +15,6 @@ var script = {
15
15
  required: false,
16
16
  default: ''
17
17
  },
18
-
19
18
  /**
20
19
  * Query string parameter value to use when `gl-tabs` `sync-active-tab-with-query-params` prop is set to `true`.
21
20
  */
@@ -30,20 +29,17 @@ var script = {
30
29
  const {
31
30
  titleLinkClass
32
31
  } = this;
33
-
34
32
  if (_isArray(titleLinkClass)) {
35
33
  return [...titleLinkClass, DEFAULT_TAB_TITLE_LINK_CLASS];
36
34
  }
37
-
38
35
  if (_isPlainObject(titleLinkClass)) {
39
- return { ...titleLinkClass,
36
+ return {
37
+ ...titleLinkClass,
40
38
  [DEFAULT_TAB_TITLE_LINK_CLASS]: true
41
39
  };
42
40
  }
43
-
44
41
  return `${titleLinkClass} ${DEFAULT_TAB_TITLE_LINK_CLASS}`.trim();
45
42
  }
46
-
47
43
  }
48
44
  };
49
45
 
@@ -15,7 +15,6 @@ var script = {
15
15
  GlResizeObserverDirective
16
16
  },
17
17
  inheritAttrs: false,
18
-
19
18
  data() {
20
19
  return {
21
20
  width: 0,
@@ -25,40 +24,31 @@ var script = {
25
24
  navScrollWidth: 0
26
25
  };
27
26
  },
28
-
29
27
  computed: {
30
28
  navClass() {
31
29
  const attrsNavClass = this.$attrs.navClass;
32
-
33
30
  if (!attrsNavClass) {
34
31
  return [NAV_CLASS];
35
32
  }
36
-
37
33
  if (_isArray(attrsNavClass)) {
38
34
  return [NAV_CLASS, ...attrsNavClass];
39
35
  }
40
-
41
36
  return [NAV_CLASS, attrsNavClass];
42
37
  },
43
-
44
38
  displayScrollLeft() {
45
39
  // if we have scrolled && there's overflow
46
40
  return this.scrollLeft && this.width < this.navScrollWidth;
47
41
  },
48
-
49
42
  displayScrollRight() {
50
43
  // if there's more overflow to the right
51
44
  return this.scrollLeft + this.width < this.navScrollWidth;
52
45
  },
53
-
54
46
  passthroughAttrs() {
55
47
  return Object.keys(this.$attrs).filter(key => !key.startsWith('action')).reduce((acc, key) => Object.assign(acc, {
56
48
  [key]: this.$attrs[key]
57
49
  }), {});
58
50
  }
59
-
60
51
  },
61
-
62
52
  mounted() {
63
53
  this.$nextTick(() => {
64
54
  this.navScrollWidth = this.getScrollWidth();
@@ -68,18 +58,15 @@ var script = {
68
58
  }, 100);
69
59
  this.getNavContainer().addEventListener('scroll', this.handleNavScroll);
70
60
  },
71
-
72
61
  beforeDestroy() {
73
62
  this.getNavContainer().removeEventListener('scroll', this.handleNavScroll);
74
63
  },
75
-
76
64
  updated() {
77
65
  // Whenever tabs are added or removed we need to recalculate the reactive scrollWidth
78
66
  this.$nextTick(() => {
79
67
  this.navScrollWidth = this.getScrollWidth();
80
68
  });
81
69
  },
82
-
83
70
  methods: {
84
71
  handleResize(_ref) {
85
72
  let {
@@ -90,17 +77,14 @@ var script = {
90
77
  this.width = width;
91
78
  this.navScrollWidth = this.getScrollWidth();
92
79
  },
93
-
94
80
  scrollTabsLeft() {
95
81
  const scrollTo = this.scrollLeft - this.width;
96
82
  this.scrollTabs(Math.max(scrollTo, 0));
97
83
  },
98
-
99
84
  scrollTabsRight() {
100
85
  const scrollTo = this.scrollLeft + this.width;
101
86
  this.scrollTabs(Math.min(scrollTo, this.getScrollWidth() - this.width));
102
87
  },
103
-
104
88
  scrollTabs(scrollTo) {
105
89
  this.getNavContainer().scrollTo({
106
90
  left: scrollTo,
@@ -108,19 +92,14 @@ var script = {
108
92
  });
109
93
  this.scrollLeft = scrollTo;
110
94
  },
111
-
112
95
  getScrollWidth() {
113
96
  var _this$getNavContainer;
114
-
115
97
  return ((_this$getNavContainer = this.getNavContainer()) === null || _this$getNavContainer === void 0 ? void 0 : _this$getNavContainer.scrollWidth) || 0;
116
98
  },
117
-
118
99
  getNavContainer() {
119
100
  var _this$$el;
120
-
121
101
  return (_this$$el = this.$el) === null || _this$$el === void 0 ? void 0 : _this$$el.querySelector(`.${NAV_CLASS}`);
122
102
  }
123
-
124
103
  },
125
104
  NAV_CLASS
126
105
  };