@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,5 @@
1
- A listbox dropdown is a button that toggles a panel containing a list of options.
2
- Listbox supports single and multi-selection.
1
+ A collapsible listbox is a button that toggles a panel containing a list of options.
2
+ It supports single and multi-selection.
3
3
 
4
4
  **Single-select:** By default, selecting an option will update the toggle label with the choice.
5
5
  But the custom toggle text can be provided.
@@ -18,7 +18,7 @@ by default.
18
18
  Optionally, you can use `no-caret` to remove the caret and `category="tertiary"` to remove the border.
19
19
 
20
20
  ```html
21
- <gl-listbox
21
+ <gl-collapsible-listbox
22
22
  icon="ellipsis_v"
23
23
  toggle-text="More options"
24
24
  text-sr-only
@@ -30,7 +30,7 @@ Optionally, you can use `no-caret` to remove the caret and `category="tertiary"`
30
30
  ### Opening the listbox
31
31
 
32
32
  Listbox will open on toggle button click (if it was previously closed).
33
- On open, `GlListbox` will emit the `shown` event.
33
+ On open, `GlCollapsibleListbox` will emit the `shown` event.
34
34
 
35
35
  ### Closing the listbox
36
36
 
@@ -40,7 +40,7 @@ The listbox is closed by any of the following:
40
40
  - clicking anywhere outside the component
41
41
  - selecting an option in single-select mode
42
42
 
43
- After closing, `GlListbox` emits a `hidden` event.
43
+ After closing, `GlCollapsibleListbox` emits a `hidden` event.
44
44
 
45
45
  ### Selecting items
46
46
 
@@ -51,7 +51,8 @@ On selection the listbox will emit the `select` event with the selected values.
51
51
 
52
52
  ### Resetting the selection
53
53
 
54
- `GlListbox` can render a reset button if the `headerText` and `resetButtonLabel` props are provided.
54
+ `GlCollapsibleListbox` can render a reset button if the `headerText` and
55
+ `resetButtonLabel` props are provided.
55
56
  When clicking on the reset button, a `reset` event is emitted. It is the consumer's responsibility
56
57
  to listen to that event and to update the model as needed.
57
58
 
@@ -85,7 +86,7 @@ template. If you want to render a custom template for items, use the
85
86
  `list-item` scoped slot:
86
87
 
87
88
  ```html
88
- <gl-listbox :items="items">
89
+ <gl-collapsible-listbox :items="items">
89
90
  <template #list-item="{ item }">
90
91
  <span class="gl-display-flex gl-align-items-center">
91
92
  <gl-avatar :size="32" class-="gl-mr-3"/>
@@ -95,7 +96,7 @@ template. If you want to render a custom template for items, use the
95
96
  </span>
96
97
  </span>
97
98
  </template>
98
- </gl-listbox>
99
+ </gl-collapsible-listbox>
99
100
  ```
100
101
 
101
102
  #### Groups
@@ -112,11 +113,11 @@ or they are all groups.
112
113
  To render custom group labels, use the `group-label` scoped slot:
113
114
 
114
115
  ```html
115
- <gl-listbox :items="groups">
116
+ <gl-collapsible-listbox :items="groups">
116
117
  <template #group-label="{ group }">
117
118
  {{ group.text }} <gl-badge size="sm">{{ group.options.length }}</gl-badge>
118
119
  </template>
119
- </gl-listbox>
120
+ </gl-collapsible-listbox>
120
121
  ```
121
122
 
122
123
  #### Search
@@ -134,9 +135,9 @@ with a number of found search results text.
134
135
  Screen reader will announce this text when the list is updated.
135
136
 
136
137
  ```html
137
- <gl-listbox :items="items" searchable>
138
+ <gl-collapsible-listbox :items="items" searchable>
138
139
  <template #search-summary-sr-only>
139
140
  5 users found
140
141
  </template>
141
- </gl-listbox>
142
+ </gl-collapsible-listbox>
142
143
  ```
@@ -12,16 +12,16 @@ import {
12
12
  ENTER,
13
13
  } from '../constants';
14
14
  import GlIntersectionObserver from '../../../utilities/intersection_observer/intersection_observer.vue';
15
- import GlListbox, { ITEM_SELECTOR } from './listbox.vue';
15
+ import GlCollapsibleListbox, { ITEM_SELECTOR } from './listbox.vue';
16
16
  import GlListboxItem from './listbox_item.vue';
17
17
  import GlListboxGroup from './listbox_group.vue';
18
18
  import { mockOptions, mockGroups } from './mock_data';
19
19
 
20
- describe('GlListbox', () => {
20
+ describe('GlCollapsibleListbox', () => {
21
21
  let wrapper;
22
22
 
23
23
  const buildWrapper = (propsData, slots = {}) => {
24
- wrapper = mount(GlListbox, {
24
+ wrapper = mount(GlCollapsibleListbox, {
25
25
  propsData,
26
26
  slots,
27
27
  attachTo: document.body,
@@ -6,7 +6,7 @@ import {
6
6
  } from '../../../../utils/constants';
7
7
  import {
8
8
  GlIcon,
9
- GlListbox,
9
+ GlCollapsibleListbox,
10
10
  GlSearchBoxByType,
11
11
  GlButtonGroup,
12
12
  GlButton,
@@ -27,7 +27,7 @@ import readme from './listbox.md';
27
27
  import { mockOptions, mockGroups, mockUsers } from './mock_data';
28
28
  import { flattenedOptions } from './utils';
29
29
 
30
- const defaultValue = (prop) => GlListbox.props[prop].default;
30
+ const defaultValue = (prop) => GlCollapsibleListbox.props[prop].default;
31
31
 
32
32
  const generateProps = ({
33
33
  items = mockOptions,
@@ -124,20 +124,20 @@ const template = (content, { label = '', bindingOverrides = {} } = {}) => `
124
124
  <div>
125
125
  ${label}
126
126
  ${label && '<br/>'}
127
- <gl-listbox
127
+ <gl-collapsible-listbox
128
128
  ref="listbox"
129
129
  v-model="selected"
130
130
  ${makeBindings(bindingOverrides)}
131
131
  >
132
132
  ${content}
133
- </gl-listbox>
133
+ </gl-collapsible-listbox>
134
134
  </div>
135
135
  `;
136
136
 
137
137
  export const Default = (args, { argTypes }) => ({
138
138
  props: Object.keys(argTypes),
139
139
  components: {
140
- GlListbox,
140
+ GlCollapsibleListbox,
141
141
  },
142
142
  data() {
143
143
  return {
@@ -159,7 +159,7 @@ Default.decorators = [makeContainer({ height: '370px' })];
159
159
  export const HeaderAndFooter = (args, { argTypes }) => ({
160
160
  props: Object.keys(argTypes),
161
161
  components: {
162
- GlListbox,
162
+ GlCollapsibleListbox,
163
163
  GlSearchBoxByType,
164
164
  GlButtonGroup,
165
165
  GlButton,
@@ -220,7 +220,7 @@ export const CustomListItem = (args, { argTypes }) => ({
220
220
  };
221
221
  },
222
222
  components: {
223
- GlListbox,
223
+ GlCollapsibleListbox,
224
224
  GlIcon,
225
225
  GlAvatar,
226
226
  },
@@ -273,7 +273,7 @@ CustomListItem.decorators = [makeContainer({ height: '200px' })];
273
273
  export const CustomToggle = (args, { argTypes }) => ({
274
274
  props: Object.keys(argTypes),
275
275
  components: {
276
- GlListbox,
276
+ GlCollapsibleListbox,
277
277
  GlAvatar,
278
278
  },
279
279
  data() {
@@ -319,7 +319,7 @@ const makeGroupedExample = (changes) => {
319
319
  props: Object.keys(argTypes),
320
320
  components: {
321
321
  GlBadge,
322
- GlListbox,
322
+ GlCollapsibleListbox,
323
323
  },
324
324
  data() {
325
325
  return {
@@ -401,7 +401,7 @@ export const CustomGroupsAndItems = makeGroupedExample({
401
401
 
402
402
  export default {
403
403
  title: 'base/new-dropdowns/listbox',
404
- component: GlListbox,
404
+ component: GlCollapsibleListbox,
405
405
  parameters: {
406
406
  docs: {
407
407
  description: {
@@ -552,7 +552,7 @@ export default {
552
552
  export const Searchable = (args, { argTypes }) => ({
553
553
  props: Object.keys(argTypes),
554
554
  components: {
555
- GlListbox,
555
+ GlCollapsibleListbox,
556
556
  },
557
557
  data() {
558
558
  return {
@@ -625,7 +625,7 @@ Searchable.decorators = [makeContainer({ height: '370px' })];
625
625
  export const SearchableGroups = (args, { argTypes }) => ({
626
626
  props: Object.keys(argTypes),
627
627
  components: {
628
- GlListbox,
628
+ GlCollapsibleListbox,
629
629
  },
630
630
  data() {
631
631
  return {
@@ -716,7 +716,7 @@ export const InfiniteScroll = (
716
716
  ) => ({
717
717
  props: Object.keys(argTypes),
718
718
  components: {
719
- GlListbox,
719
+ GlCollapsibleListbox,
720
720
  },
721
721
  data() {
722
722
  return {
@@ -1,6 +1,8 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
- import { clamp, uniqueId, isNil } from 'lodash';
3
+ import clamp from 'lodash/clamp';
4
+ import uniqueId from 'lodash/uniqueId';
5
+ import isNil from 'lodash/isNil';
4
6
  import { stopEvent } from '../../../../utils/utils';
5
7
  import {
6
8
  GL_DROPDOWN_SHOWN,
@@ -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
  props: {
@@ -1,4 +1,5 @@
1
- import { isString, isNumber } from 'lodash';
1
+ import isNumber from 'lodash/isNumber';
2
+ import isString from 'lodash/isString';
2
3
 
3
4
  const isOption = (item) => Boolean(item) && (isString(item.value) || isNumber(item.value));
4
5
 
@@ -4,7 +4,7 @@ exports[`Path matches the snapshot 1`] = `
4
4
  <div
5
5
  class="gl-path-nav"
6
6
  data-testid="gl-path-nav"
7
- style="--path-bg-color: white;"
7
+ style="--path-bg-color: rgba(0,0,0,0);"
8
8
  >
9
9
  <span
10
10
  class="gl-path-fade gl-path-fade-left"
@@ -197,7 +197,7 @@ exports[`Path renders the list of items with icons matches the snapshot 1`] = `
197
197
  <div
198
198
  class="gl-path-nav"
199
199
  data-testid="gl-path-nav"
200
- style="--path-bg-color: white;"
200
+ style="--path-bg-color: rgba(0,0,0,0);"
201
201
  >
202
202
  <span
203
203
  class="gl-path-fade gl-path-fade-left"
@@ -396,7 +396,7 @@ exports[`Path renders the list of items with metrics matches the snapshot 1`] =
396
396
  <div
397
397
  class="gl-path-nav"
398
398
  data-testid="gl-path-nav"
399
- style="--path-bg-color: white;"
399
+ style="--path-bg-color: rgba(0,0,0,0);"
400
400
  >
401
401
  <span
402
402
  class="gl-path-fade gl-path-fade-left"
@@ -13,7 +13,7 @@ $path-chevron-right-margin: px-to-rem(14px);
13
13
 
14
14
  // Mixins
15
15
  @mixin gl-path-active-item-color($color) {
16
- @include gl-text-white;
16
+ @include gl-text-contrast-light;
17
17
  background-color: $color;
18
18
 
19
19
  &::after {
@@ -94,13 +94,13 @@ $path-chevron-right-margin: px-to-rem(14px);
94
94
  }
95
95
 
96
96
  &[disabled] {
97
- @include gl-text-gray-400;
97
+ color: $gl-text-color-disabled;
98
98
  @include gl-cursor-not-allowed;
99
99
  }
100
100
 
101
101
  &:not([disabled]):hover {
102
102
  @include gl-path-active-item-color($gray-100);
103
- @include gl-text-gray-900;
103
+ color: $gl-text-color;
104
104
  }
105
105
 
106
106
  &:active,
@@ -5,7 +5,7 @@ import GlPath from './path.vue';
5
5
 
6
6
  const SELECTED_CLASS_INDIGO = 'gl-path-active-item-indigo';
7
7
  const SELECTED_CLASS_GREEN = 'gl-path-active-item-green';
8
- const BACKGROUND_COLOR_WHITE = 'white';
8
+ const BACKGROUND_COLOR_DEFAULT = 'rgba(0,0,0,0)';
9
9
  const BACKGROUND_COLOR_LIGHT_GRAY = '#f0f0f0';
10
10
 
11
11
  describe('Path', () => {
@@ -70,7 +70,7 @@ describe('Path', () => {
70
70
  describe('background color selection', () => {
71
71
  describe('with no background color specified', () => {
72
72
  it('displays the default background color', () => {
73
- expect(pathNav().style.getPropertyValue('--path-bg-color')).toBe(BACKGROUND_COLOR_WHITE);
73
+ expect(pathNav().style.getPropertyValue('--path-bg-color')).toBe(BACKGROUND_COLOR_DEFAULT);
74
74
  });
75
75
  });
76
76
 
@@ -1,7 +1,8 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
3
  import iconSpriteInfo from '@gitlab/svgs/dist/icons.json';
4
- import { uniqueId, findLast } from 'lodash';
4
+ import uniqueId from 'lodash/uniqueId';
5
+ import findLast from 'lodash/findLast';
5
6
  import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
6
7
  import { glThemes } from '../../../utils/constants';
7
8
  import GlIcon from '../icon/icon.vue';
@@ -49,7 +50,7 @@ export default {
49
50
  backgroundColor: {
50
51
  type: String,
51
52
  required: false,
52
- default: 'white',
53
+ default: 'rgba(0,0,0,0)',
53
54
  },
54
55
  },
55
56
  data() {
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { range } from 'lodash';
2
+ import range from 'lodash/range';
3
3
  import { uid } from '../../../utils/utils';
4
4
 
5
5
  const DEFAULT_LINE_MAX_WIDTH = 235;
@@ -1,7 +1,7 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
3
  import { BTab } from 'bootstrap-vue';
4
- import { isArray, isPlainObject } from 'lodash';
4
+ import isPlainObject from 'lodash/isPlainObject';
5
5
 
6
6
  import { DEFAULT_TAB_TITLE_LINK_CLASS } from '../constants';
7
7
 
@@ -29,7 +29,7 @@ export default {
29
29
  linkClass() {
30
30
  const { titleLinkClass } = this;
31
31
 
32
- if (isArray(titleLinkClass)) {
32
+ if (Array.isArray(titleLinkClass)) {
33
33
  return [...titleLinkClass, DEFAULT_TAB_TITLE_LINK_CLASS];
34
34
  }
35
35
  if (isPlainObject(titleLinkClass)) {
@@ -1,5 +1,6 @@
1
1
  import { mount } from '@vue/test-utils';
2
- import { range, mapValues } from 'lodash';
2
+ import range from 'lodash/range';
3
+ import mapValues from 'lodash/mapValues';
3
4
  import { useMockResizeObserver } from '~helpers/mock_dom_observer';
4
5
  import GlTab from '../tab/tab.vue';
5
6
  import GlScrollableTabs from './scrollable_tabs.vue';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { debounce, isArray } from 'lodash';
2
+ import debounce from 'lodash/debounce';
3
3
  import { GlResizeObserverDirective } from '../../../../directives/resize_observer/resize_observer';
4
4
  import GlIcon from '../../icon/icon.vue';
5
5
  import GlTabs from './tabs.vue';
@@ -31,7 +31,7 @@ export default {
31
31
  if (!attrsNavClass) {
32
32
  return [NAV_CLASS];
33
33
  }
34
- if (isArray(attrsNavClass)) {
34
+ if (Array.isArray(attrsNavClass)) {
35
35
  return [NAV_CLASS, ...attrsNavClass];
36
36
  }
37
37
 
@@ -1,4 +1,4 @@
1
- import { range } from 'lodash';
1
+ import range from 'lodash/range';
2
2
  import { GlTabs, GlTab, GlScrollableTabs, GlBadge } from '../../../../index';
3
3
  import { badgeVariantOptions } from '../../../../utils/constants';
4
4
  import readme from './tabs.md';
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable import/no-default-export */
2
2
  import { ToastPlugin } from 'bootstrap-vue';
3
- import { isFunction } from 'lodash';
3
+ import isFunction from 'lodash/isFunction';
4
4
  import CloseButton from '../../shared_components/close_button/close_button.vue';
5
5
 
6
6
  const DEFAULT_OPTIONS = {
@@ -1,6 +1,6 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
- import { uniqueId } from 'lodash';
3
+ import uniqueId from 'lodash/uniqueId';
4
4
 
5
5
  import { toggleLabelPosition } from '../../../utils/constants';
6
6
  import GlIcon from '../icon/icon.vue';
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { uniqueId } from 'lodash';
2
+ import uniqueId from 'lodash/uniqueId';
3
3
  import { tokensValidator } from './helpers';
4
4
  import GlTokenContainer from './token_container.vue';
5
5
  import GlTokenSelectorDropdown from './token_selector_dropdown.vue';
@@ -1,4 +1,4 @@
1
- import { times } from 'lodash';
1
+ import times from 'lodash/times';
2
2
  import { GlAreaChart } from '../../../charts';
3
3
  import { mockAnnotationsSeries, mockAnnotationsConfigs } from '../../../utils/charts/mock_data';
4
4
  import { toolbox } from '../../../utils/charts/story_config';
@@ -1,6 +1,8 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
- import { merge, isFinite, uniq, sortBy } from 'lodash';
3
+ import merge from 'lodash/merge';
4
+ import uniq from 'lodash/uniq';
5
+ import sortBy from 'lodash/sortBy';
4
6
  import { gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue } from '../../../utils/charts/theme';
5
7
  import Chart from '../chart/chart.vue';
6
8
 
@@ -19,7 +21,7 @@ const gaugeChartSeries = ({ value, text, min, max, splitNumber, axisColor }) =>
19
21
  detail: {
20
22
  show: true,
21
23
  formatter: () => {
22
- const currentValue = isFinite(value) ? value : null;
24
+ const currentValue = Number.isFinite(value) ? value : null;
23
25
 
24
26
  return text || (currentValue ?? '--');
25
27
  },
@@ -31,7 +33,7 @@ const gaugeChartSeries = ({ value, text, min, max, splitNumber, axisColor }) =>
31
33
  axisLabel: {
32
34
  show: true,
33
35
  fontSize: AXIS_LABEL_FONT_SIZE_PX,
34
- formatter: (theValue) => (isFinite(theValue) ? theValue : '--'),
36
+ formatter: (theValue) => (Number.isFinite(theValue) ? theValue : '--'),
35
37
  color: `${gaugeNeutralHues[1]}`,
36
38
  },
37
39
  axisLine: {
@@ -72,7 +74,7 @@ export default {
72
74
  required: false,
73
75
  default: () => [],
74
76
  validator: (value) => {
75
- return value?.length ? value.every((item) => isFinite(item)) : true;
77
+ return value?.length ? value.every((item) => Number.isFinite(item)) : true;
76
78
  },
77
79
  },
78
80
  text: {
@@ -117,7 +119,7 @@ export default {
117
119
 
118
120
  const uniqueThresholds = uniq(thresholds);
119
121
  const filteredThresholds = uniqueThresholds.filter((threshold) => {
120
- return isFinite(threshold) && threshold > min && threshold < max;
122
+ return Number.isFinite(threshold) && threshold > min && threshold < max;
121
123
  });
122
124
  /**
123
125
  * Only the first two thresholds will be used
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { memoize } from 'lodash';
2
+ import memoize from 'lodash/memoize';
3
3
 
4
4
  const getObserver = memoize(
5
5
  (options) =>
@@ -1,7 +1,8 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <script>
3
3
  /* eslint-disable no-continue */
4
- import { has, isString } from 'lodash';
4
+ import has from 'lodash/has';
5
+ import isString from 'lodash/isString';
5
6
 
6
7
  const PREFIX = '%{';
7
8
  const SUFFIX = '}';
@@ -1,5 +1,5 @@
1
1
  import { mount } from '@vue/test-utils';
2
- import { merge } from 'lodash';
2
+ import merge from 'lodash/merge';
3
3
  import { OutsideDirective } from './outside';
4
4
 
5
5
  describe('outside directive', () => {
@@ -315,6 +315,7 @@ $t-gray-a-24: rgba($gray-950, 0.24);
315
315
  // Text
316
316
  $gl-text-color: $gray-900 !default;
317
317
  $gl-text-color-secondary: $gray-500 !default;
318
+ $gl-text-color-disabled: $gray-400 !default;
318
319
 
319
320
  $gl-font-weight-light: 300;
320
321
  $gl-font-weight-normal: 400;
@@ -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 { blue500 } from '../../../scss_to_js/scss_variables'; // eslint-disable-line import/no-unresolved
5
4
  import { GlBreakpointInstance } from '../breakpoints';
@@ -155,7 +154,7 @@ export const mergeAnnotationAxisToOptions = (options, hasAnnotations = false) =>
155
154
 
156
155
  export 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
 
160
159
  return useSlider ? getDataZoomConfig({ filterMode: 'weakFilter' }) : [];
161
160
  };
@@ -1,6 +1,6 @@
1
1
  /* global jest, beforeEach, afterEach */
2
2
  /* eslint-disable class-methods-use-this, max-classes-per-file, camelcase */
3
- import { isMatch, isArray } from 'lodash';
3
+ import isMatch from 'lodash/isMatch';
4
4
 
5
5
  /**
6
6
  * This class gives us a JSDom friendly DOM observer which we can manually trigger in tests
@@ -49,7 +49,7 @@ class MockObserver {
49
49
  if (!nodeParam) {
50
50
  return this.$_observers.map(([node]) => node);
51
51
  }
52
- if (!isArray(nodeParam)) {
52
+ if (!Array.isArray(nodeParam)) {
53
53
  return [nodeParam];
54
54
  }
55
55