@gitlab/ui 132.1.0 → 132.2.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 (232) hide show
  1. package/dist/components/base/accordion/accordion_item.js +1 -3
  2. package/dist/components/base/avatar/avatar.js +76 -5
  3. package/dist/components/base/badge/badge.js +5 -7
  4. package/dist/components/base/button/button.js +1 -3
  5. package/dist/components/base/collapse/collapse.js +2 -6
  6. package/dist/components/base/datepicker/datepicker.js +4 -5
  7. package/dist/components/base/daterange_picker/daterange_picker.js +2 -4
  8. package/dist/components/base/dropdown/dropdown_item.js +3 -4
  9. package/dist/components/base/filtered_search/filtered_search.js +55 -7
  10. package/dist/components/base/filtered_search/filtered_search_token.js +6 -14
  11. package/dist/components/base/filtered_search/filtered_search_token_segment.js +39 -19
  12. package/dist/components/base/filtered_search/filtered_search_utils.js +57 -7
  13. package/dist/components/base/form/form_checkbox/form_checkbox.js +13 -26
  14. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -3
  15. package/dist/components/base/form/form_fields/form_fields_loop.js +57 -6
  16. package/dist/components/base/form/form_group/form_group.js +1 -3
  17. package/dist/components/base/form/form_input/form_input.js +95 -41
  18. package/dist/components/base/form/form_input_group/form_input_group.js +2 -4
  19. package/dist/components/base/form/form_radio/form_radio.js +5 -9
  20. package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -3
  21. package/dist/components/base/form/form_select/form_select.js +76 -5
  22. package/dist/components/base/infinite_scroll/infinite_scroll.js +7 -14
  23. package/dist/components/base/link/link.js +26 -7
  24. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +93 -32
  25. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +2 -6
  26. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +2 -6
  27. package/dist/components/base/new_dropdowns/listbox/listbox.js +5 -13
  28. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +1 -3
  29. package/dist/components/base/new_dropdowns/listbox/mock_data.js +2 -6
  30. package/dist/components/base/new_dropdowns/listbox/utils.js +6 -11
  31. package/dist/components/base/path/path.js +1 -5
  32. package/dist/components/base/search_box_by_type/search_box_by_type.js +2 -6
  33. package/dist/components/base/skeleton_loader/skeleton_loader.js +3 -5
  34. package/dist/components/base/table/table.js +32 -21
  35. package/dist/components/base/table_lite/table_lite.js +1 -3
  36. package/dist/components/base/tabs/tab/tab.js +1 -3
  37. package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -5
  38. package/dist/components/base/token_selector/token_selector.js +2 -6
  39. package/dist/components/charts/area/area.js +6 -7
  40. package/dist/components/charts/column/column.js +11 -15
  41. package/dist/components/charts/discrete_scatter/discrete_scatter.js +57 -5
  42. package/dist/components/charts/gauge/gauge.js +13 -21
  43. package/dist/components/charts/heatmap/heatmap.js +66 -18
  44. package/dist/components/charts/legend/legend.js +59 -13
  45. package/dist/components/charts/line/line.js +6 -7
  46. package/dist/components/charts/shared/tooltip/tooltip.js +11 -18
  47. package/dist/components/charts/sparkline/sparkline.js +72 -19
  48. package/dist/components/charts/stacked_column/stacked_column.js +18 -31
  49. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +37 -21
  50. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +3 -7
  51. package/dist/components/utilities/intersperse/intersperse.js +6 -11
  52. package/dist/components/utilities/sprintf/sprintf.js +58 -7
  53. package/dist/components/utilities/truncate/truncate.js +2 -4
  54. package/dist/components/utilities/truncate_text/truncate_text.js +1 -3
  55. package/dist/config.js +3 -4
  56. package/dist/directives/hover_load/hover_load.js +1 -3
  57. package/dist/directives/outside/outside.js +9 -16
  58. package/dist/directives/resize_observer/resize_observer.js +6 -8
  59. package/dist/directives/safe_html/safe_html.js +1 -3
  60. package/dist/directives/safe_link/safe_link.js +11 -14
  61. package/dist/index.css +2 -2
  62. package/dist/index.css.map +1 -1
  63. package/dist/tokens/build/js/tokens.dark.js +95 -95
  64. package/dist/tokens/build/js/tokens.js +74 -74
  65. package/dist/tokens/common_story_options.js +7 -8
  66. package/dist/utils/charts/config.js +122 -90
  67. package/dist/utils/constants.js +26 -1
  68. package/dist/utils/data_utils.js +28 -1
  69. package/dist/utils/form_options_utils.js +4 -6
  70. package/dist/utils/is_slot_empty.js +3 -5
  71. package/dist/utils/stories_utils.js +8 -8
  72. package/dist/utils/use_mock_intersection_observer.js +63 -12
  73. package/dist/utils/utils.js +76 -19
  74. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +8 -11
  75. package/dist/vendor/bootstrap-vue/src/components/button/button.js +12 -17
  76. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +3 -6
  77. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +6 -9
  78. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +14 -19
  79. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +8 -13
  80. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +9 -12
  81. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +8 -11
  82. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +9 -14
  83. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +34 -43
  84. package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +5 -9
  85. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +7 -10
  86. package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +5 -9
  87. package/dist/vendor/bootstrap-vue/src/components/form/form.js +7 -10
  88. package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +25 -33
  89. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +6 -11
  90. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +6 -12
  91. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +28 -29
  92. package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +7 -10
  93. package/dist/vendor/bootstrap-vue/src/components/layout/col.js +7 -11
  94. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +3 -5
  95. package/dist/vendor/bootstrap-vue/src/components/link/link.js +19 -31
  96. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +3 -4
  97. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +59 -68
  98. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +2 -4
  99. package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +4 -5
  100. package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +11 -7
  101. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +4 -6
  102. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +3 -6
  103. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +4 -7
  104. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +1 -3
  105. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +16 -20
  106. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +14 -25
  107. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +23 -35
  108. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +6 -8
  109. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +8 -10
  110. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +8 -15
  111. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +33 -41
  112. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +3 -8
  113. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +38 -50
  114. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +19 -31
  115. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +13 -23
  116. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +5 -6
  117. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +17 -21
  118. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +4 -6
  119. package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +1 -3
  120. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +3 -6
  121. package/dist/vendor/bootstrap-vue/src/components/table/td.js +9 -14
  122. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +1 -2
  123. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +1 -2
  124. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +2 -5
  125. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +19 -36
  126. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +66 -81
  127. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +2 -6
  128. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +5 -11
  129. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +8 -14
  130. package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +19 -22
  131. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +7 -10
  132. package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +7 -14
  133. package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +4 -5
  134. package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +5 -9
  135. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +17 -29
  136. package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +6 -7
  137. package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +1 -2
  138. package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +5 -6
  139. package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +1 -2
  140. package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +1 -2
  141. package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +29 -43
  142. package/dist/vendor/bootstrap-vue/src/mixins/id.js +1 -2
  143. package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +62 -15
  144. package/dist/vendor/bootstrap-vue/src/utils/dom.js +3 -9
  145. package/dist/vendor/bootstrap-vue/src/utils/events.js +7 -5
  146. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +4 -5
  147. package/dist/vendor/bootstrap-vue/src/utils/router.js +9 -13
  148. package/package.json +9 -7
  149. package/src/scss/gitlab_ui.scss +3 -0
  150. package/src/scss/storybook.scss +3 -0
  151. package/src/scss/themes.scss +84 -0
  152. package/src/tokens/build/css/tokens.css +142 -142
  153. package/src/tokens/build/css/tokens.dark.css +138 -138
  154. package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +580 -580
  155. package/src/tokens/build/docs/tokens-tailwind-docs.json +495 -495
  156. package/src/tokens/build/figma/constants.dark.json +799 -799
  157. package/src/tokens/build/figma/constants.json +799 -799
  158. package/src/tokens/build/js/tokens.dark.js +95 -95
  159. package/src/tokens/build/js/tokens.js +74 -74
  160. package/src/tokens/build/json/tokens.dark.json +1668 -1668
  161. package/src/tokens/build/json/tokens.json +1647 -1647
  162. package/src/tokens/build/scss/_tokens.dark.scss +138 -138
  163. package/src/tokens/build/scss/_tokens.scss +142 -142
  164. package/src/tokens/build/scss/_tokens_custom_properties.scss +73 -73
  165. package/src/tokens/constant/color.blue.tokens.json +182 -0
  166. package/src/tokens/constant/color.brand.tokens.json +252 -0
  167. package/src/tokens/constant/color.data.tokens.json +894 -0
  168. package/src/tokens/constant/color.green.tokens.json +182 -0
  169. package/src/tokens/constant/color.neutral.tokens.json +230 -0
  170. package/src/tokens/constant/color.orange.tokens.json +182 -0
  171. package/src/tokens/constant/color.purple.tokens.json +182 -0
  172. package/src/tokens/constant/color.red.tokens.json +182 -0
  173. package/src/tokens/constant/color.theme.tokens.json +1168 -0
  174. package/src/tokens/deprecated/deprecated.color.tokens.json +134 -1340
  175. package/src/utils/constants.js +9 -0
  176. package/src/vendor/bootstrap-vue/src/components/button/button-close.js +4 -5
  177. package/src/vendor/bootstrap-vue/src/components/button/button.js +7 -8
  178. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +1 -2
  179. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +2 -8
  180. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +6 -7
  181. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +3 -4
  182. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +6 -12
  183. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +2 -3
  184. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +3 -4
  185. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +19 -26
  186. package/src/vendor/bootstrap-vue/src/components/form/form-text.js +4 -6
  187. package/src/vendor/bootstrap-vue/src/components/form/form.js +4 -6
  188. package/src/vendor/bootstrap-vue/src/components/form-group/form-group.js +14 -20
  189. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +1 -2
  190. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +1 -4
  191. package/src/vendor/bootstrap-vue/src/components/form-select/form-select.js +13 -14
  192. package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +5 -6
  193. package/src/vendor/bootstrap-vue/src/components/modal/modal.js +53 -62
  194. package/src/vendor/bootstrap-vue/src/components/popover/popover.js +4 -10
  195. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +1 -2
  196. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +2 -3
  197. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +5 -6
  198. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +5 -13
  199. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +12 -21
  200. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +2 -3
  201. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +5 -11
  202. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +4 -5
  203. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +14 -21
  204. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +1 -2
  205. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +14 -20
  206. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +3 -9
  207. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +1 -2
  208. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +5 -11
  209. package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +4 -5
  210. package/src/vendor/bootstrap-vue/src/components/table/tbody.js +2 -3
  211. package/src/vendor/bootstrap-vue/src/components/table/td.js +5 -6
  212. package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +1 -2
  213. package/src/vendor/bootstrap-vue/src/components/table/thead.js +1 -2
  214. package/src/vendor/bootstrap-vue/src/components/table/tr.js +1 -2
  215. package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +10 -16
  216. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +33 -39
  217. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +17 -25
  218. package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +4 -5
  219. package/src/vendor/bootstrap-vue/src/components/transporter/transporter.js +4 -10
  220. package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +9 -15
  221. package/src/vendor/bootstrap-vue/src/mixins/form-control.js +6 -7
  222. package/src/vendor/bootstrap-vue/src/mixins/form-custom.js +1 -2
  223. package/src/vendor/bootstrap-vue/src/mixins/form-options.js +5 -6
  224. package/src/vendor/bootstrap-vue/src/mixins/form-size.js +1 -2
  225. package/src/vendor/bootstrap-vue/src/mixins/form-state.js +1 -2
  226. package/src/vendor/bootstrap-vue/src/mixins/form-text.js +21 -33
  227. package/src/vendor/bootstrap-vue/src/mixins/id.js +1 -2
  228. package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
  229. package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
  230. package/src/tokens/constant/color.tokens.json +0 -3422
  231. package/src/vendor/bootstrap-vue/src/mixins/model.js +0 -5
  232. package/src/vendor/bootstrap-vue/src/utils/model.js +0 -29
@@ -1,6 +1,55 @@
1
1
  import Vue from 'vue';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
+ function _arrayLikeToArray(r, a) {
5
+ (null == a || a > r.length) && (a = r.length);
6
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
7
+ return n;
8
+ }
9
+ function _arrayWithHoles(r) {
10
+ if (Array.isArray(r)) return r;
11
+ }
12
+ function _iterableToArrayLimit(r, l) {
13
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
14
+ if (null != t) {
15
+ var e,
16
+ n,
17
+ i,
18
+ u,
19
+ a = [],
20
+ f = !0,
21
+ o = !1;
22
+ try {
23
+ if (i = (t = t.call(r)).next, 0 === l) {
24
+ if (Object(t) !== t) return;
25
+ f = !1;
26
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
27
+ } catch (r) {
28
+ o = !0, n = r;
29
+ } finally {
30
+ try {
31
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
32
+ } finally {
33
+ if (o) throw n;
34
+ }
35
+ }
36
+ return a;
37
+ }
38
+ }
39
+ function _nonIterableRest() {
40
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
41
+ }
42
+ function _slicedToArray(r, e) {
43
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
44
+ }
45
+ function _unsupportedIterableToArray(r, a) {
46
+ if (r) {
47
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
48
+ var t = {}.toString.call(r).slice(8, -1);
49
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
50
+ }
51
+ }
52
+
4
53
  var script = {
5
54
  name: 'GlFormFieldsLoop',
6
55
  props: {
@@ -10,14 +59,14 @@ var script = {
10
59
  }
11
60
  },
12
61
  render(createElement) {
13
- const {
14
- Fragment
15
- } = Vue;
62
+ const Fragment = Vue.Fragment;
16
63
 
17
64
  // Vue 3, key goes on `Fragment` (<template> element)
18
65
  if (Fragment) {
19
66
  return createElement('div', Object.entries(this.fields).map(_ref => {
20
- let [fieldName, field] = _ref;
67
+ let _ref2 = _slicedToArray(_ref, 2),
68
+ fieldName = _ref2[0],
69
+ field = _ref2[1];
21
70
  return createElement(Fragment, {
22
71
  key: field.id
23
72
  }, this.$scopedSlots.default({
@@ -28,8 +77,10 @@ var script = {
28
77
  }
29
78
 
30
79
  // Vue 2, key goes on element (rendered via default slot)
31
- return createElement('div', Object.entries(this.fields).map(_ref2 => {
32
- let [fieldName, field] = _ref2;
80
+ return createElement('div', Object.entries(this.fields).map(_ref3 => {
81
+ let _ref4 = _slicedToArray(_ref3, 2),
82
+ fieldName = _ref4[0],
83
+ field = _ref4[1];
33
84
  return this.$scopedSlots.default({
34
85
  fieldName,
35
86
  field
@@ -55,9 +55,7 @@ var script = {
55
55
  },
56
56
  computed: {
57
57
  actualLabelClass() {
58
- const {
59
- labelClass
60
- } = this;
58
+ const labelClass = this.labelClass;
61
59
  const defaultClass = 'col-form-label';
62
60
  if (isString(labelClass)) {
63
61
  return `${labelClass} ${defaultClass}`;
@@ -4,6 +4,77 @@ import { stopEvent, isVisible } from '../../../../utils/utils';
4
4
  import { formInputWidths } from '../../../../utils/constants';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
+ function _arrayLikeToArray(r, a) {
8
+ (null == a || a > r.length) && (a = r.length);
9
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
10
+ return n;
11
+ }
12
+ function _arrayWithHoles(r) {
13
+ if (Array.isArray(r)) return r;
14
+ }
15
+ function _iterableToArrayLimit(r, l) {
16
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
17
+ if (null != t) {
18
+ var e,
19
+ n,
20
+ i,
21
+ u,
22
+ a = [],
23
+ f = !0,
24
+ o = !1;
25
+ try {
26
+ if (i = (t = t.call(r)).next, 0 === l) {
27
+ if (Object(t) !== t) return;
28
+ f = !1;
29
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
30
+ } catch (r) {
31
+ o = !0, n = r;
32
+ } finally {
33
+ try {
34
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
35
+ } finally {
36
+ if (o) throw n;
37
+ }
38
+ }
39
+ return a;
40
+ }
41
+ }
42
+ function _nonIterableRest() {
43
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
44
+ }
45
+ function _objectWithoutProperties(e, t) {
46
+ if (null == e) return {};
47
+ var o,
48
+ r,
49
+ i = _objectWithoutPropertiesLoose(e, t);
50
+ if (Object.getOwnPropertySymbols) {
51
+ var n = Object.getOwnPropertySymbols(e);
52
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
53
+ }
54
+ return i;
55
+ }
56
+ function _objectWithoutPropertiesLoose(r, e) {
57
+ if (null == r) return {};
58
+ var t = {};
59
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
60
+ if (-1 !== e.indexOf(n)) continue;
61
+ t[n] = r[n];
62
+ }
63
+ return t;
64
+ }
65
+ function _slicedToArray(r, e) {
66
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
67
+ }
68
+ function _unsupportedIterableToArray(r, a) {
69
+ if (r) {
70
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
71
+ var t = {}.toString.call(r).slice(8, -1);
72
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
73
+ }
74
+ }
75
+
76
+ const _excluded = ["default"];
77
+
7
78
  // Valid supported input types
8
79
  const TYPES = ['text', 'password', 'email', 'number', 'url', 'tel', 'search', 'range', 'color', 'date', 'time', 'datetime', 'datetime-local', 'month', 'week'];
9
80
  const MODEL_PROP = 'value';
@@ -234,32 +305,26 @@ var script = {
234
305
  },
235
306
  localType() {
236
307
  // We only allow certain types
237
- const {
238
- type
239
- } = this;
308
+ const type = this.type;
240
309
  return TYPES.includes(type) ? type : 'text';
241
310
  },
242
311
  computedAriaInvalid() {
243
- const {
244
- ariaInvalid
245
- } = this;
312
+ const ariaInvalid = this.ariaInvalid;
246
313
  if (ariaInvalid === true || ariaInvalid === 'true' || ariaInvalid === '') {
247
314
  return 'true';
248
315
  }
249
316
  return this.computedState === false ? 'true' : ariaInvalid;
250
317
  },
251
318
  computedAttrs() {
252
- const {
253
- localType: type,
254
- name,
255
- form,
256
- disabled,
257
- placeholder,
258
- required,
259
- min,
260
- max,
261
- step
262
- } = this;
319
+ const type = this.localType,
320
+ name = this.name,
321
+ form = this.form,
322
+ disabled = this.disabled,
323
+ placeholder = this.placeholder,
324
+ required = this.required,
325
+ min = this.min,
326
+ max = this.max,
327
+ step = this.step;
263
328
  return {
264
329
  id: this.computedId,
265
330
  name,
@@ -292,16 +357,17 @@ var script = {
292
357
  return [];
293
358
  }
294
359
  if (isObject(this.width)) {
295
- const {
296
- default: defaultWidth,
297
- ...nonDefaultWidths
298
- } = this.width;
360
+ const _this$width = this.width,
361
+ defaultWidth = _this$width.default,
362
+ nonDefaultWidths = _objectWithoutProperties(_this$width, _excluded);
299
363
  return [
300
364
  // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility
301
365
  ...(defaultWidth ? [`gl-form-input-${defaultWidth}`] : []), ...Object.entries(nonDefaultWidths).map(
302
366
  // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility
303
367
  _ref => {
304
- let [breakpoint, width] = _ref;
368
+ let _ref2 = _slicedToArray(_ref, 2),
369
+ breakpoint = _ref2[0],
370
+ width = _ref2[1];
305
371
  return `gl-${breakpoint}-form-input-${width}`;
306
372
  })];
307
373
  }
@@ -310,10 +376,8 @@ var script = {
310
376
  return [`gl-form-input-${this.width}`];
311
377
  },
312
378
  computedClass() {
313
- const {
314
- plaintext,
315
- type
316
- } = this;
379
+ const plaintext = this.plaintext,
380
+ type = this.type;
317
381
  const isRange = type === 'range';
318
382
  const isColor = type === 'color';
319
383
  return [...this.widthClasses, {
@@ -477,9 +541,7 @@ var script = {
477
541
  },
478
542
  updateValue(value) {
479
543
  let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
480
- const {
481
- lazy
482
- } = this;
544
+ const lazy = this.lazy;
483
545
  if (lazy && !force) {
484
546
  return;
485
547
  }
@@ -523,9 +585,7 @@ var script = {
523
585
  if (event.target.composing) {
524
586
  return;
525
587
  }
526
- const {
527
- value
528
- } = event.target;
588
+ const value = event.target.value;
529
589
  const formattedValue = this.formatValue(value, event);
530
590
  // Exit when the `formatter` function strictly returned `false`
531
591
  // or prevented the input event
@@ -544,9 +604,7 @@ var script = {
544
604
  this.$emit('update', formattedValue);
545
605
  },
546
606
  onChange(event) {
547
- const {
548
- value
549
- } = event.target;
607
+ const value = event.target.value;
550
608
  const formattedValue = this.formatValue(value, event);
551
609
  // Exit when the `formatter` function strictly returned `false`
552
610
  // or prevented the input event
@@ -563,9 +621,7 @@ var script = {
563
621
  onBlur(event) {
564
622
  // Apply the `localValue` on blur to prevent cursor jumps
565
623
  // on mobile browsers (e.g. caused by autocomplete)
566
- const {
567
- value
568
- } = event.target;
624
+ const value = event.target.value;
569
625
  const formattedValue = this.formatValue(value, event, true);
570
626
  if (formattedValue !== false) {
571
627
  // We need to use the modified value here to apply the
@@ -579,9 +635,7 @@ var script = {
579
635
  this.$emit('blur', event);
580
636
  },
581
637
  setWheelStopper(on) {
582
- const {
583
- input
584
- } = this.$refs;
638
+ const input = this.$refs.input;
585
639
  // We use native events, so that we don't interfere with propagation
586
640
  if (on) {
587
641
  input.addEventListener('focus', this.onWheelFocus);
@@ -71,10 +71,8 @@ var script = {
71
71
  }
72
72
  },
73
73
  updateValue(option) {
74
- const {
75
- name,
76
- value
77
- } = option;
74
+ const name = option.name,
75
+ value = option.value;
78
76
  this.activeOption = name;
79
77
  this.localValue = value;
80
78
  }
@@ -131,12 +131,10 @@ var script = {
131
131
  return (this.isGroup ? this.group.groupName : this.name) || null;
132
132
  },
133
133
  computedAttrs() {
134
- const {
135
- isDisabled: disabled,
136
- isRequired: required,
137
- value,
138
- isChecked: checked
139
- } = this;
134
+ const disabled = this.isDisabled,
135
+ required = this.isRequired,
136
+ value = this.value,
137
+ checked = this.isChecked;
140
138
  return {
141
139
  ...this.$attrs,
142
140
  id: this.internalId,
@@ -176,9 +174,7 @@ var script = {
176
174
  }
177
175
  },
178
176
  handleChange() {
179
- const {
180
- value
181
- } = this;
177
+ const value = this.value;
182
178
 
183
179
  // Update `computedLocalChecked`
184
180
  this.computedLocalChecked = value;
@@ -106,9 +106,7 @@ var script = {
106
106
  return isBoolean(this.state) ? this.state : null;
107
107
  },
108
108
  computedAriaInvalid() {
109
- const {
110
- ariaInvalid
111
- } = this;
109
+ const ariaInvalid = this.ariaInvalid;
112
110
  if (ariaInvalid === true || ariaInvalid === 'true' || ariaInvalid === '') {
113
111
  return 'true';
114
112
  }
@@ -3,6 +3,76 @@ import { BFormSelect } from '../../../../vendor/bootstrap-vue/src/components/for
3
3
  import { formInputWidths } from '../../../../utils/constants';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
+ function _arrayLikeToArray(r, a) {
7
+ (null == a || a > r.length) && (a = r.length);
8
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
9
+ return n;
10
+ }
11
+ function _arrayWithHoles(r) {
12
+ if (Array.isArray(r)) return r;
13
+ }
14
+ function _iterableToArrayLimit(r, l) {
15
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
16
+ if (null != t) {
17
+ var e,
18
+ n,
19
+ i,
20
+ u,
21
+ a = [],
22
+ f = !0,
23
+ o = !1;
24
+ try {
25
+ if (i = (t = t.call(r)).next, 0 === l) {
26
+ if (Object(t) !== t) return;
27
+ f = !1;
28
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
29
+ } catch (r) {
30
+ o = !0, n = r;
31
+ } finally {
32
+ try {
33
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
34
+ } finally {
35
+ if (o) throw n;
36
+ }
37
+ }
38
+ return a;
39
+ }
40
+ }
41
+ function _nonIterableRest() {
42
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
43
+ }
44
+ function _objectWithoutProperties(e, t) {
45
+ if (null == e) return {};
46
+ var o,
47
+ r,
48
+ i = _objectWithoutPropertiesLoose(e, t);
49
+ if (Object.getOwnPropertySymbols) {
50
+ var n = Object.getOwnPropertySymbols(e);
51
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
52
+ }
53
+ return i;
54
+ }
55
+ function _objectWithoutPropertiesLoose(r, e) {
56
+ if (null == r) return {};
57
+ var t = {};
58
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
59
+ if (-1 !== e.indexOf(n)) continue;
60
+ t[n] = r[n];
61
+ }
62
+ return t;
63
+ }
64
+ function _slicedToArray(r, e) {
65
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
66
+ }
67
+ function _unsupportedIterableToArray(r, a) {
68
+ if (r) {
69
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
70
+ var t = {}.toString.call(r).slice(8, -1);
71
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
72
+ }
73
+ }
74
+
75
+ const _excluded = ["default"];
6
76
  var script = {
7
77
  name: 'GlFormSelect',
8
78
  components: {
@@ -37,16 +107,17 @@ var script = {
37
107
  return [];
38
108
  }
39
109
  if (isObject(this.width)) {
40
- const {
41
- default: defaultWidth,
42
- ...nonDefaultWidths
43
- } = this.width;
110
+ const _this$width = this.width,
111
+ defaultWidth = _this$width.default,
112
+ nonDefaultWidths = _objectWithoutProperties(_this$width, _excluded);
44
113
  return [
45
114
  // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility
46
115
  ...(defaultWidth ? [`gl-form-select-${defaultWidth}`] : []), ...Object.entries(nonDefaultWidths).map(
47
116
  // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility
48
117
  _ref => {
49
- let [breakpoint, width] = _ref;
118
+ let _ref2 = _slicedToArray(_ref, 2),
119
+ breakpoint = _ref2[0],
120
+ width = _ref2[1];
50
121
  return `gl-${breakpoint}-form-select-${width}`;
51
122
  })];
52
123
  }
@@ -52,17 +52,14 @@ var script = {
52
52
  fetchedItems(newVal, oldVal) {
53
53
  // Re-adjust scroll to the current item if more items are added
54
54
  if (newVal > oldVal) {
55
- const {
56
- scrollHeight,
57
- scrollTop
58
- } = this.$refs.infiniteContainer;
55
+ const _this$$refs$infiniteC = this.$refs.infiniteContainer,
56
+ scrollHeight = _this$$refs$infiniteC.scrollHeight,
57
+ scrollTop = _this$$refs$infiniteC.scrollTop;
59
58
  // Only when scrolled to the top
60
59
  if (scrollHeight !== 0 && scrollTop === 0) {
61
60
  // Wait until the DOM is fully updated to adjust scroll
62
61
  this.$nextTick(() => {
63
- const {
64
- scrollHeight: newScrollHeight
65
- } = this.$refs.infiniteContainer;
62
+ const newScrollHeight = this.$refs.infiniteContainer.scrollHeight;
66
63
 
67
64
  // New scrollTop is the new height, minus the old height
68
65
  // minus a small space to allow the user to trigger a scroll once more
@@ -103,9 +100,7 @@ var script = {
103
100
  * to avoid triggering the event.
104
101
  */
105
102
  scrollDown() {
106
- const {
107
- scrollHeight
108
- } = this.$refs.infiniteContainer;
103
+ const scrollHeight = this.$refs.infiniteContainer.scrollHeight;
109
104
  this.scrollTo({
110
105
  top: scrollHeight - adjustScrollGap
111
106
  });
@@ -120,10 +115,8 @@ var script = {
120
115
  * See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo)
121
116
  */
122
117
  scrollTo(_ref) {
123
- let {
124
- top,
125
- behavior
126
- } = _ref;
118
+ let top = _ref.top,
119
+ behavior = _ref.behavior;
127
120
  this.$refs.infiniteContainer.scrollTo({
128
121
  top,
129
122
  behavior
@@ -6,6 +6,28 @@ import { safeVueInstance, isVue3 } from '../../../utils/vue_utils';
6
6
  import { linkVariantOptions, linkVariantUnstyled, linkVariantInline, linkVariantMeta } from '../../../utils/constants';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
+ function _objectWithoutProperties(e, t) {
10
+ if (null == e) return {};
11
+ var o,
12
+ r,
13
+ i = _objectWithoutPropertiesLoose(e, t);
14
+ if (Object.getOwnPropertySymbols) {
15
+ var n = Object.getOwnPropertySymbols(e);
16
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
17
+ }
18
+ return i;
19
+ }
20
+ function _objectWithoutPropertiesLoose(r, e) {
21
+ if (null == r) return {};
22
+ var t = {};
23
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
24
+ if (-1 !== e.indexOf(n)) continue;
25
+ t[n] = r[n];
26
+ }
27
+ return t;
28
+ }
29
+
30
+ const _excluded = ["click"];
9
31
  const ANCHOR_TAG = 'a';
10
32
  const NUXT_LINK_TAG = 'nuxt-link';
11
33
  const VUE_ROUTER_LINK_TAG = 'router-link';
@@ -160,9 +182,7 @@ var script = {
160
182
  computedHref() {
161
183
  const fallback = '#';
162
184
  const toFallback = '/';
163
- const {
164
- to
165
- } = this;
185
+ const to = this.to;
166
186
 
167
187
  // Return `href` when explicitly provided
168
188
  if (this.href) {
@@ -214,10 +234,9 @@ var script = {
214
234
  };
215
235
  },
216
236
  computedListeners() {
217
- const {
218
- click,
219
- ...listenersWithoutClick
220
- } = this.$listeners;
237
+ const _this$$listeners = this.$listeners;
238
+ _this$$listeners.click;
239
+ const listenersWithoutClick = _objectWithoutProperties(_this$$listeners, _excluded);
221
240
  return listenersWithoutClick;
222
241
  },
223
242
  computedClass() {