@gitlab/ui 56.1.1 → 56.1.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 (89) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/base/accordion/accordion.js +2 -2
  3. package/dist/components/base/accordion/accordion_item.js +2 -2
  4. package/dist/components/base/avatar/avatar.js +4 -3
  5. package/dist/components/base/avatars_inline/avatars_inline.js +4 -4
  6. package/dist/components/base/datepicker/datepicker.js +3 -2
  7. package/dist/components/base/dropdown/dropdown.js +4 -2
  8. package/dist/components/base/filtered_search/filtered_search.js +5 -5
  9. package/dist/components/base/filtered_search/filtered_search_token.js +3 -3
  10. package/dist/components/base/filtered_search/filtered_search_token_segment.js +2 -2
  11. package/dist/components/base/filtered_search/filtered_search_utils.js +7 -7
  12. package/dist/components/base/form/form_checkbox/form_checkbox.js +2 -2
  13. package/dist/components/base/form/form_combobox/form_combobox.js +3 -3
  14. package/dist/components/base/form/form_date/form_date.js +4 -4
  15. package/dist/components/base/form/form_group/form_group.js +5 -6
  16. package/dist/components/base/form/form_input/form_input.js +3 -3
  17. package/dist/components/base/form/form_select/form_select.js +3 -3
  18. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +2 -2
  19. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +6 -5
  20. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +2 -2
  21. package/dist/components/base/new_dropdowns/disclosure/utils.js +2 -2
  22. package/dist/components/base/new_dropdowns/listbox/listbox.js +9 -8
  23. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +2 -2
  24. package/dist/components/base/new_dropdowns/listbox/utils.js +3 -3
  25. package/dist/components/base/path/path.js +6 -5
  26. package/dist/components/base/skeleton_loader/skeleton_loader.js +2 -2
  27. package/dist/components/base/tabs/tab/tab.js +4 -4
  28. package/dist/components/base/tabs/tabs/scrollable_tabs.js +3 -4
  29. package/dist/components/base/toast/toast.js +3 -2
  30. package/dist/components/base/toggle/toggle.js +3 -2
  31. package/dist/components/base/token_selector/token_selector.js +3 -3
  32. package/dist/components/charts/gauge/gauge.js +11 -11
  33. package/dist/components/utilities/intersection_observer/intersection_observer.js +2 -2
  34. package/dist/components/utilities/sprintf/sprintf.js +7 -6
  35. package/dist/utils/charts/config.js +1 -2
  36. package/dist/utils/use_mock_intersection_observer.js +5 -4
  37. package/package.json +11 -8
  38. package/scss_to_js/scss_variables.js +1 -0
  39. package/scss_to_js/scss_variables.json +5 -0
  40. package/src/components/base/accordion/accordion.vue +1 -1
  41. package/src/components/base/accordion/accordion_item.vue +1 -1
  42. package/src/components/base/avatar/avatar.vue +1 -1
  43. package/src/components/base/avatars_inline/avatars_inline.vue +2 -1
  44. package/src/components/base/datepicker/datepicker.vue +1 -1
  45. package/src/components/base/dropdown/dropdown.md +2 -3
  46. package/src/components/base/dropdown/dropdown.vue +1 -1
  47. package/src/components/base/filtered_search/filtered_search.spec.js +1 -1
  48. package/src/components/base/filtered_search/filtered_search.vue +2 -1
  49. package/src/components/base/filtered_search/filtered_search_token.vue +1 -1
  50. package/src/components/base/filtered_search/filtered_search_token_segment.vue +1 -1
  51. package/src/components/base/filtered_search/filtered_search_utils.js +3 -1
  52. package/src/components/base/form/form_checkbox/form_checkbox.vue +1 -1
  53. package/src/components/base/form/form_combobox/form_combobox.spec.js +1 -1
  54. package/src/components/base/form/form_combobox/form_combobox.vue +1 -1
  55. package/src/components/base/form/form_date/form_date.vue +1 -1
  56. package/src/components/base/form/form_group/form_group.vue +3 -2
  57. package/src/components/base/form/form_input/form_input.vue +1 -1
  58. package/src/components/base/form/form_select/form_select.vue +1 -1
  59. package/src/components/base/modal/modal.spec.js +1 -1
  60. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +1 -1
  61. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +2 -1
  62. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +1 -1
  63. package/src/components/base/new_dropdowns/disclosure/utils.js +1 -1
  64. package/src/components/base/new_dropdowns/listbox/listbox.md +13 -12
  65. package/src/components/base/new_dropdowns/listbox/listbox.spec.js +3 -3
  66. package/src/components/base/new_dropdowns/listbox/listbox.stories.js +13 -13
  67. package/src/components/base/new_dropdowns/listbox/listbox.vue +3 -1
  68. package/src/components/base/new_dropdowns/listbox/listbox_group.vue +1 -1
  69. package/src/components/base/new_dropdowns/listbox/utils.js +2 -1
  70. package/src/components/base/path/__snapshots__/path.spec.js.snap +3 -3
  71. package/src/components/base/path/path.scss +3 -3
  72. package/src/components/base/path/path.spec.js +2 -2
  73. package/src/components/base/path/path.vue +3 -2
  74. package/src/components/base/skeleton_loader/skeleton_loader.vue +1 -1
  75. package/src/components/base/tabs/tab/tab.vue +2 -2
  76. package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +2 -1
  77. package/src/components/base/tabs/tabs/scrollable_tabs.vue +2 -2
  78. package/src/components/base/tabs/tabs/tabs.stories.js +1 -1
  79. package/src/components/base/toast/toast.js +1 -1
  80. package/src/components/base/toggle/toggle.vue +1 -1
  81. package/src/components/base/token_selector/token_selector.vue +1 -1
  82. package/src/components/charts/area/area.stories.js +1 -1
  83. package/src/components/charts/gauge/gauge.vue +7 -5
  84. package/src/components/utilities/intersection_observer/intersection_observer.vue +1 -1
  85. package/src/components/utilities/sprintf/sprintf.vue +2 -1
  86. package/src/directives/outside/outside.spec.js +1 -1
  87. package/src/scss/variables.scss +1 -0
  88. package/src/utils/charts/config.js +1 -2
  89. package/src/utils/use_mock_intersection_observer.js +2 -2
@@ -1,5 +1,4 @@
1
- import _isArray from 'lodash/isArray';
2
- import _debounce from 'lodash/debounce';
1
+ import debounce from 'lodash/debounce';
3
2
  import { GlResizeObserverDirective } from '../../../../directives/resize_observer/resize_observer';
4
3
  import GlIcon from '../../icon/icon';
5
4
  import GlTabs from './tabs';
@@ -30,7 +29,7 @@ var script = {
30
29
  if (!attrsNavClass) {
31
30
  return [NAV_CLASS];
32
31
  }
33
- if (_isArray(attrsNavClass)) {
32
+ if (Array.isArray(attrsNavClass)) {
34
33
  return [NAV_CLASS, ...attrsNavClass];
35
34
  }
36
35
  return [NAV_CLASS, attrsNavClass];
@@ -53,7 +52,7 @@ var script = {
53
52
  this.$nextTick(() => {
54
53
  this.navScrollWidth = this.getScrollWidth();
55
54
  });
56
- this.handleNavScroll = _debounce(e => {
55
+ this.handleNavScroll = debounce(e => {
57
56
  this.scrollLeft = e.target.scrollLeft;
58
57
  }, 100);
59
58
  this.getNavContainer().addEventListener('scroll', this.handleNavScroll);
@@ -1,7 +1,8 @@
1
- import _isFunction from 'lodash/isFunction';
2
1
  import { ToastPlugin } from 'bootstrap-vue/esm/index.js';
2
+ import isFunction from 'lodash/isFunction';
3
3
  import CloseButton from '../../shared_components/close_button/close_button';
4
4
 
5
+ /* eslint-disable import/no-default-export */
5
6
  const DEFAULT_OPTIONS = {
6
7
  autoHideDelay: 5000,
7
8
  toastClass: 'gl-toast',
@@ -39,7 +40,7 @@ function showToast(message) {
39
40
  id,
40
41
  hide
41
42
  };
42
- if (_isFunction(options.onComplete)) {
43
+ if (isFunction(options.onComplete)) {
43
44
  const toastHiddenCallback = e => {
44
45
  if (e.componentId === id) {
45
46
  this.$root.$off('bv::toast:hidden', toastHiddenCallback);
@@ -1,9 +1,10 @@
1
- import _uniqueId from 'lodash/uniqueId';
1
+ import uniqueId from 'lodash/uniqueId';
2
2
  import { toggleLabelPosition } from '../../../utils/constants';
3
3
  import GlIcon from '../icon/icon';
4
4
  import GlLoadingIcon from '../loading_icon/loading_icon';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
+ //
7
8
  let uuid = 0;
8
9
  var script = {
9
10
  components: {
@@ -82,7 +83,7 @@ var script = {
82
83
  },
83
84
  data() {
84
85
  return {
85
- labelId: _uniqueId('toggle-label-')
86
+ labelId: uniqueId('toggle-label-')
86
87
  };
87
88
  },
88
89
  computed: {
@@ -1,4 +1,4 @@
1
- import _uniqueId from 'lodash/uniqueId';
1
+ import uniqueId from 'lodash/uniqueId';
2
2
  import { tokensValidator } from './helpers';
3
3
  import GlTokenContainer from './token_container';
4
4
  import GlTokenSelectorDropdown from './token_selector_dropdown';
@@ -6,7 +6,7 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
7
  var script = {
8
8
  name: 'GlTokenSelector',
9
- componentId: _uniqueId('token-selector'),
9
+ componentId: uniqueId('token-selector'),
10
10
  components: {
11
11
  GlTokenContainer,
12
12
  GlTokenSelectorDropdown
@@ -293,7 +293,7 @@ var script = {
293
293
  addToken() {
294
294
  let dropdownItem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
295
295
  const token = dropdownItem !== null ? dropdownItem : {
296
- id: _uniqueId('user-defined-token'),
296
+ id: uniqueId('user-defined-token'),
297
297
  name: this.inputText
298
298
  };
299
299
 
@@ -1,11 +1,11 @@
1
- import _sortBy from 'lodash/sortBy';
2
- import _uniq from 'lodash/uniq';
3
- import _isFinite from 'lodash/isFinite';
4
- import _merge from 'lodash/merge';
1
+ import merge from 'lodash/merge';
2
+ import uniq from 'lodash/uniq';
3
+ import sortBy from 'lodash/sortBy';
5
4
  import { gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue } from '../../../utils/charts/theme';
6
5
  import Chart from '../chart/chart';
7
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
7
 
8
+ //
9
9
  const AXIS_LABEL_FONT_SIZE_PX = 14;
10
10
  const ARC_RADIUS = '80%';
11
11
  const DETAIL_FONT_SIZE_PX = 30;
@@ -27,7 +27,7 @@ const gaugeChartSeries = _ref => {
27
27
  detail: {
28
28
  show: true,
29
29
  formatter: () => {
30
- const currentValue = _isFinite(value) ? value : null;
30
+ const currentValue = Number.isFinite(value) ? value : null;
31
31
  return text || (currentValue !== null && currentValue !== void 0 ? currentValue : '--');
32
32
  },
33
33
  color: `${gaugeNeutralHues[0]}`,
@@ -38,7 +38,7 @@ const gaugeChartSeries = _ref => {
38
38
  axisLabel: {
39
39
  show: true,
40
40
  fontSize: AXIS_LABEL_FONT_SIZE_PX,
41
- formatter: theValue => _isFinite(theValue) ? theValue : '--',
41
+ formatter: theValue => Number.isFinite(theValue) ? theValue : '--',
42
42
  color: `${gaugeNeutralHues[1]}`
43
43
  },
44
44
  axisLine: {
@@ -83,7 +83,7 @@ var script = {
83
83
  required: false,
84
84
  default: () => [],
85
85
  validator: value => {
86
- return value !== null && value !== void 0 && value.length ? value.every(item => _isFinite(item)) : true;
86
+ return value !== null && value !== void 0 && value.length ? value.every(item => Number.isFinite(item)) : true;
87
87
  }
88
88
  },
89
89
  text: {
@@ -104,7 +104,7 @@ var script = {
104
104
  },
105
105
  computed: {
106
106
  options() {
107
- const mergedOptions = _merge({}, {
107
+ const mergedOptions = merge({}, {
108
108
  series: gaugeChartSeries({
109
109
  value: this.value,
110
110
  text: this.text,
@@ -123,15 +123,15 @@ var script = {
123
123
  max
124
124
  } = this;
125
125
  if (!(thresholds !== null && thresholds !== void 0 && thresholds.length)) return [];
126
- const uniqueThresholds = _uniq(thresholds);
126
+ const uniqueThresholds = uniq(thresholds);
127
127
  const filteredThresholds = uniqueThresholds.filter(threshold => {
128
- return _isFinite(threshold) && threshold > min && threshold < max;
128
+ return Number.isFinite(threshold) && threshold > min && threshold < max;
129
129
  });
130
130
  /**
131
131
  * Only the first two thresholds will be used
132
132
  */
133
133
  const reducedThresholdsList = filteredThresholds.length > 2 ? [filteredThresholds[0], filteredThresholds[1]] : [...filteredThresholds];
134
- const sortedThresholds = _sortBy(reducedThresholdsList);
134
+ const sortedThresholds = sortBy(reducedThresholdsList);
135
135
  return sortedThresholds;
136
136
  },
137
137
  valueIsInLastThreshold() {
@@ -1,7 +1,7 @@
1
- import _memoize from 'lodash/memoize';
1
+ import memoize from 'lodash/memoize';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
- const getObserver = _memoize(options => new IntersectionObserver(entries => {
4
+ const getObserver = memoize(options => new IntersectionObserver(entries => {
5
5
  entries.forEach(entry => {
6
6
  entry.target.$_gl_intersectionHandler(entry);
7
7
  });
@@ -1,7 +1,8 @@
1
- import _isString from 'lodash/isString';
2
- import _has from 'lodash/has';
1
+ import has from 'lodash/has';
2
+ import isString from 'lodash/isString';
3
3
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
4
 
5
+ //
5
6
  const PREFIX = '%{';
6
7
  const SUFFIX = '}';
7
8
  const START_SUFFIX = 'Start';
@@ -20,7 +21,7 @@ function groupPlaceholdersByStartTag() {
20
21
  }
21
22
  function getPlaceholderDefinition(chunk, placeholdersByStartTag) {
22
23
  const tagName = chunk.slice(PREFIX.length, -SUFFIX.length);
23
- if (_has(placeholdersByStartTag, tagName)) {
24
+ if (has(placeholdersByStartTag, tagName)) {
24
25
  // Use provided custom placeholder definition
25
26
  return {
26
27
  ...placeholdersByStartTag[tagName],
@@ -61,7 +62,7 @@ var script = {
61
62
  type: Object,
62
63
  required: false,
63
64
  default: undefined,
64
- validator: value => Object.values(value).every(tagPair => Array.isArray(tagPair) && tagPair.length === 2 && tagPair.every(_isString))
65
+ validator: value => Object.values(value).every(tagPair => Array.isArray(tagPair) && tagPair.length === 2 && tagPair.every(isString))
65
66
  }
66
67
  },
67
68
  /**
@@ -109,7 +110,7 @@ var script = {
109
110
  // between them and skip past the end placeholder
110
111
  const content = chunks.slice(i, indexOfEnd);
111
112
  i = indexOfEnd + 1;
112
- if (!_has(slots, slotName)) {
113
+ if (!has(slots, slotName)) {
113
114
  // Slot hasn't been provided; return placeholders and content as-is
114
115
  vnodes.push(chunk, ...content, chunks[indexOfEnd]);
115
116
  continue;
@@ -124,7 +125,7 @@ var script = {
124
125
  }
125
126
 
126
127
  // By process of elimination, chunk must be a plain placeholder
127
- vnodes.push(_has(slots, tagName) ? slots[tagName]() : chunk);
128
+ vnodes.push(has(slots, tagName) ? slots[tagName]() : chunk);
128
129
  continue;
129
130
  }
130
131
  return vnodes;
@@ -1,5 +1,4 @@
1
1
  import castArray from 'lodash/castArray';
2
- import isArray from 'lodash/isArray';
3
2
  import merge from 'lodash/merge';
4
3
  import { GlBreakpointInstance } from '../breakpoints';
5
4
  import { columnOptions } from '../constants';
@@ -155,7 +154,7 @@ const mergeAnnotationAxisToOptions = function (options) {
155
154
  };
156
155
  const dataZoomAdjustments = dataZoom => {
157
156
  // handle cases where dataZoom is array and object.
158
- const useSlider = dataZoom && isArray(dataZoom) ? dataZoom.length : Boolean(dataZoom);
157
+ const useSlider = dataZoom && Array.isArray(dataZoom) ? dataZoom.length : Boolean(dataZoom);
159
158
  return useSlider ? getDataZoomConfig({
160
159
  filterMode: 'weakFilter'
161
160
  }) : [];
@@ -1,5 +1,6 @@
1
- import _isArray from 'lodash/isArray';
2
- import _isMatch from 'lodash/isMatch';
1
+ import isMatch from 'lodash/isMatch';
2
+
3
+ /* global jest, beforeEach, afterEach */
3
4
 
4
5
  /**
5
6
  * This class gives us a JSDom friendly DOM observer which we can manually trigger in tests
@@ -46,7 +47,7 @@ class MockObserver {
46
47
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47
48
  return this.$_observers.some(_ref => {
48
49
  let [obvNode, obvOptions] = _ref;
49
- return node === obvNode && _isMatch(options, obvOptions);
50
+ return node === obvNode && isMatch(options, obvOptions);
50
51
  });
51
52
  }
52
53
  $_getNodesFromParam(nodeParam) {
@@ -56,7 +57,7 @@ class MockObserver {
56
57
  return node;
57
58
  });
58
59
  }
59
- if (!_isArray(nodeParam)) {
60
+ if (!Array.isArray(nodeParam)) {
60
61
  return [nodeParam];
61
62
  }
62
63
  return nodeParam;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "56.1.1",
3
+ "version": "56.1.2",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -77,17 +77,18 @@
77
77
  "vue": "^2.6.10"
78
78
  },
79
79
  "resolutions": {
80
+ "@storybook/vue/webpack": "^5.9.0",
80
81
  "chokidar": "^3.5.2",
81
82
  "sane": "^5.0.1"
82
83
  },
83
84
  "devDependencies": {
84
85
  "@arkweid/lefthook": "0.7.7",
85
- "@babel/core": "^7.20.12",
86
+ "@babel/core": "^7.21.0",
86
87
  "@babel/preset-env": "^7.20.2",
87
88
  "@gitlab/eslint-plugin": "18.1.0",
88
89
  "@gitlab/fonts": "^1.2.0",
89
90
  "@gitlab/stylelint-config": "4.1.0",
90
- "@gitlab/svgs": "3.20.0",
91
+ "@gitlab/svgs": "3.21.0",
91
92
  "@rollup/plugin-commonjs": "^11.1.0",
92
93
  "@rollup/plugin-node-resolve": "^7.1.3",
93
94
  "@rollup/plugin-replace": "^2.3.2",
@@ -97,6 +98,8 @@
97
98
  "@storybook/addon-storyshots": "6.5.16",
98
99
  "@storybook/addon-storyshots-puppeteer": "6.5.16",
99
100
  "@storybook/addon-viewport": "6.5.16",
101
+ "@storybook/builder-webpack5": "^6.5.16",
102
+ "@storybook/manager-webpack5": "^6.5.16",
100
103
  "@storybook/theming": "6.5.16",
101
104
  "@storybook/vue": "6.5.16",
102
105
  "@vue/compat": "^3.2.40",
@@ -108,7 +111,6 @@
108
111
  "autoprefixer": "^9.7.6",
109
112
  "babel-jest": "29.0.1",
110
113
  "babel-loader": "^8.0.5",
111
- "babel-plugin-lodash": "^3.3.4",
112
114
  "babel-plugin-require-context-hook": "^1.0.0",
113
115
  "babel-preset-vue": "^2.0.2",
114
116
  "bootstrap": "4.5.3",
@@ -123,9 +125,9 @@
123
125
  "glob": "^7.2.0",
124
126
  "identity-obj-proxy": "^3.0.0",
125
127
  "inquirer-select-directory": "^1.2.0",
126
- "jest": "^29.4.2",
127
- "jest-circus": "29.4.2",
128
- "jest-environment-jsdom": "29.4.2",
128
+ "jest": "^29.4.3",
129
+ "jest-circus": "29.4.3",
130
+ "jest-environment-jsdom": "29.4.3",
129
131
  "markdownlint-cli": "^0.29.0",
130
132
  "mockdate": "^2.0.5",
131
133
  "npm-run-all": "^4.1.5",
@@ -155,7 +157,8 @@
155
157
  "vue": "2.7.14",
156
158
  "vue-loader": "^15.8.3",
157
159
  "vue-template-compiler": "2.7.14",
158
- "vue-test-utils-compat": "^0.0.10"
160
+ "vue-test-utils-compat": "^0.0.10",
161
+ "webpack": "^5.9.0"
159
162
  },
160
163
  "release": {
161
164
  "branches": [
@@ -247,6 +247,7 @@ export const tGrayA16 = 'rgba(31, 30, 36, 0.16)'
247
247
  export const tGrayA24 = 'rgba(31, 30, 36, 0.24)'
248
248
  export const glTextColor = '#333238'
249
249
  export const glTextColorSecondary = '#737278'
250
+ export const glTextColorDisabled = '#89888d'
250
251
  export const glFontWeightLight = '300'
251
252
  export const glFontWeightNormal = '400'
252
253
  export const glFontWeightBold = '600'
@@ -1272,6 +1272,11 @@
1272
1272
  "value": "$gray-500",
1273
1273
  "compiledValue": "#737278"
1274
1274
  },
1275
+ {
1276
+ "name": "$gl-text-color-disabled",
1277
+ "value": "$gray-400",
1278
+ "compiledValue": "#89888d"
1279
+ },
1275
1280
  {
1276
1281
  "name": "$gl-font-weight-light",
1277
1282
  "value": "300",
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { uniqueId } from 'lodash';
2
+ import uniqueId from 'lodash/uniqueId';
3
3
 
4
4
  export default {
5
5
  name: 'GlAccordion',
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import { BCollapse } from 'bootstrap-vue';
3
- import { uniqueId } from 'lodash';
3
+ import uniqueId from 'lodash/uniqueId';
4
4
  import { GlCollapseToggleDirective } from '../../../directives/collapse_toggle';
5
5
  import GlButton from '../button/button.vue';
6
6
 
@@ -1,6 +1,6 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
- import { isNumber } from 'lodash';
3
+ import isNumber from 'lodash/isNumber';
4
4
  import { avatarShapeOptions, avatarSizeOptions } from '../../../utils/constants';
5
5
  import { getAvatarChar } from '../../../utils/string_utils';
6
6
 
@@ -1,5 +1,6 @@
1
1
  <script>
2
- import { get, truncate } from 'lodash';
2
+ import truncate from 'lodash/truncate';
3
+ import get from 'lodash/get';
3
4
  import { avatarsInlineSizeOptions } from '../../../utils/constants';
4
5
  import GlAvatar from '../avatar/avatar.vue';
5
6
  import GlTooltip from '../tooltip/tooltip.vue';
@@ -1,6 +1,6 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
- import { isString } from 'lodash';
3
+ import isString from 'lodash/isString';
4
4
  import Pikaday from 'pikaday';
5
5
  import { defaultDateFormat, datepickerSizeOptionsMap } from '../../../utils/constants';
6
6
  import { areDatesEqual } from '../../../utils/datetime_utility';
@@ -5,9 +5,8 @@ collapsed behind a button.
5
5
  > more suited to the various use cases for dropdowns. Consider using a more
6
6
  > appropriate component instead:
7
7
  >
8
- > - For single or multiselect options, use `GlListbox`.
9
- > - For other use cases (e.g., displaying a list of actions like "Edit user",
10
- > "Delete user"), continue to use `GlDropdown` for now.
8
+ > - For single or multiselect options, use `GlCollapsibleListbox`.
9
+ > - For displaying a list of actions like "Edit user", "Delete user", use `GlDisclosureDropdown`.
11
10
  >
12
11
  > See [this epic](https://gitlab.com/groups/gitlab-org/-/epics/1059) for the
13
12
  > most up-to-date information about what to use and when.
@@ -3,7 +3,7 @@
3
3
  import Vue from 'vue';
4
4
  import { BDropdown } from 'bootstrap-vue';
5
5
  import { isVisible, selectAll } from 'bootstrap-vue/src/utils/dom';
6
- import { merge } from 'lodash';
6
+ import merge from 'lodash/merge';
7
7
  import {
8
8
  buttonCategoryOptions,
9
9
  buttonSizeOptions,
@@ -1,5 +1,5 @@
1
1
  import Vue, { nextTick } from 'vue';
2
- import { omit } from 'lodash';
2
+ import omit from 'lodash/omit';
3
3
  import { shallowMount, mount } from '@vue/test-utils';
4
4
  import GlFilteredSearch from './filtered_search.vue';
5
5
  import GlFilteredSearchSuggestion from './filtered_search_suggestion.vue';
@@ -1,5 +1,6 @@
1
1
  <script>
2
- import { cloneDeep, isEqual } from 'lodash';
2
+ import isEqual from 'lodash/isEqual';
3
+ import cloneDeep from 'lodash/cloneDeep';
3
4
  import PortalVue from 'portal-vue';
4
5
  import Vue from 'vue';
5
6
  import { GlTooltipDirective } from '../../../directives/tooltip';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { cloneDeep } from 'lodash';
2
+ import cloneDeep from 'lodash/cloneDeep';
3
3
  import { COMMA } from '../../../utils/constants';
4
4
  import GlToken from '../token/token.vue';
5
5
  import GlFilteredSearchTokenSegment from './filtered_search_token_segment.vue';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { last } from 'lodash';
2
+ import last from 'lodash/last';
3
3
  import { Portal } from 'portal-vue';
4
4
  import { COMMA, LEFT_MOUSE_BUTTON } from '../../../utils/constants';
5
5
  import GlFilteredSearchSuggestion from './filtered_search_suggestion.vue';
@@ -1,4 +1,6 @@
1
- import { first, last, isString } from 'lodash';
1
+ import first from 'lodash/first';
2
+ import last from 'lodash/last';
3
+ import isString from 'lodash/isString';
2
4
 
3
5
  export const TERM_TOKEN_TYPE = 'filtered-search-term';
4
6
 
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import { BFormCheckbox } from 'bootstrap-vue';
3
- import { uniqueId } from 'lodash';
3
+ import uniqueId from 'lodash/uniqueId';
4
4
 
5
5
  export default {
6
6
  name: 'GlFormCheckbox',
@@ -1,5 +1,5 @@
1
1
  import { nextTick } from 'vue';
2
- import { cloneDeep } from 'lodash';
2
+ import cloneDeep from 'lodash/cloneDeep';
3
3
  import { mount } from '@vue/test-utils';
4
4
  import GlDropdownItem from '../../dropdown/dropdown_item.vue';
5
5
  import GlFormInput from '../form_input/form_input.vue';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { uniqueId } from 'lodash';
2
+ import uniqueId from 'lodash/uniqueId';
3
3
 
4
4
  import GlDropdownItem from '../../dropdown/dropdown_item.vue';
5
5
  import GlDropdownDivider from '../../dropdown/dropdown_divider.vue';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { uniqueId } from 'lodash';
2
+ import uniqueId from 'lodash/uniqueId';
3
3
  import GlFormInput from '../form_input/form_input.vue';
4
4
 
5
5
  export default {
@@ -1,6 +1,7 @@
1
1
  <script>
2
2
  import { BFormGroup } from 'bootstrap-vue';
3
- import { isString, isArray, isPlainObject } from 'lodash';
3
+ import isString from 'lodash/isString';
4
+ import isPlainObject from 'lodash/isPlainObject';
4
5
 
5
6
  export default {
6
7
  components: {
@@ -37,7 +38,7 @@ export default {
37
38
  if (isString(labelClass)) {
38
39
  return `${labelClass} ${defaultClass}`;
39
40
  }
40
- if (isArray(labelClass)) {
41
+ if (Array.isArray(labelClass)) {
41
42
  return [...labelClass, defaultClass];
42
43
  }
43
44
  if (isPlainObject(labelClass)) {
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { isObject } from 'lodash';
2
+ import isObject from 'lodash/isObject';
3
3
  import { BFormInput } from 'bootstrap-vue';
4
4
 
5
5
  import { formInputSizes } from '../../../../utils/constants';
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import { BFormSelect } from 'bootstrap-vue';
3
- import { isObject } from 'lodash';
3
+ import isObject from 'lodash/isObject';
4
4
  import { formInputSizes } from '../../../../utils/constants';
5
5
 
6
6
  export default {
@@ -1,6 +1,6 @@
1
1
  import { shallowMount } from '@vue/test-utils';
2
2
  import { BModal } from 'bootstrap-vue';
3
- import { merge } from 'lodash';
3
+ import merge from 'lodash/merge';
4
4
  import { modalButtonDefaults } from '~/utils/constants';
5
5
  import CloseButton from '../../shared_components/close_button/close_button.vue';
6
6
  import Button from '../button/button.vue';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { uniqueId } from 'lodash';
2
+ import uniqueId from 'lodash/uniqueId';
3
3
  import { createPopper } from '@popperjs/core';
4
4
  import {
5
5
  buttonCategoryOptions,
@@ -1,6 +1,7 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
- import { clamp, uniqueId } from 'lodash';
3
+ import clamp from 'lodash/clamp';
4
+ import uniqueId from 'lodash/uniqueId';
4
5
  import { stopEvent, filterVisible } from '../../../../utils/utils';
5
6
  import {
6
7
  GL_DROPDOWN_SHOWN,
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { uniqueId } from 'lodash';
2
+ import uniqueId from 'lodash/uniqueId';
3
3
  import GlDisclosureDropdownItem from './disclosure_dropdown_item.vue';
4
4
  import { isGroup } from './utils';
5
5
  import { DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
@@ -1,4 +1,4 @@
1
- import { isFunction } from 'lodash';
1
+ import isFunction from 'lodash/isFunction';
2
2
  import { DISCLOSURE_DROPDOWN_ITEM_NAME, DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
3
3
 
4
4
  const itemValidator = (item) => item?.text?.length > 0 && !Array.isArray(item?.items);