@gitlab/ui 128.17.1 → 129.1.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 (136) hide show
  1. package/dist/components/base/accordion/accordion_item.js +1 -1
  2. package/dist/components/base/avatar/avatar.js +1 -1
  3. package/dist/components/base/avatar/utils.js +1 -1
  4. package/dist/components/base/avatars_inline/avatars_inline.js +1 -2
  5. package/dist/components/base/breadcrumb/breadcrumb.js +1 -1
  6. package/dist/components/base/datepicker/datepicker.js +1 -1
  7. package/dist/components/base/daterange_picker/daterange_picker.js +1 -1
  8. package/dist/components/base/drawer/drawer.js +1 -1
  9. package/dist/components/base/dropdown/dropdown.js +1 -1
  10. package/dist/components/base/filtered_search/filtered_search.js +1 -2
  11. package/dist/components/base/filtered_search/filtered_search_token.js +1 -2
  12. package/dist/components/base/filtered_search/filtered_search_token_segment.js +1 -1
  13. package/dist/components/base/filtered_search/filtered_search_utils.js +1 -3
  14. package/dist/components/base/form/form_character_count/form_character_count.js +1 -1
  15. package/dist/components/base/form/form_checkbox/form_checkbox.js +5 -4
  16. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -4
  17. package/dist/components/base/form/form_combobox/form_combobox.js +1 -1
  18. package/dist/components/base/form/form_date/form_date.js +1 -1
  19. package/dist/components/base/form/form_fields/form_fields.js +1 -3
  20. package/dist/components/base/form/form_group/form_group.js +1 -3
  21. package/dist/components/base/form/form_input/form_input.js +1 -5
  22. package/dist/components/base/form/form_radio/form_radio.js +209 -11
  23. package/dist/components/base/form/form_select/form_select.js +1 -1
  24. package/dist/components/base/form/form_textarea/form_textarea.js +1 -1
  25. package/dist/components/base/infinite_scroll/infinite_scroll.js +1 -1
  26. package/dist/components/base/link/link.js +1 -6
  27. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +1 -2
  28. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +1 -2
  29. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +1 -1
  30. package/dist/components/base/new_dropdowns/disclosure/utils.js +1 -1
  31. package/dist/components/base/new_dropdowns/listbox/listbox.js +1 -2
  32. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +1 -1
  33. package/dist/components/base/new_dropdowns/listbox/utils.js +1 -2
  34. package/dist/components/base/pagination/pagination.js +1 -3
  35. package/dist/components/base/path/path.js +1 -2
  36. package/dist/components/base/skeleton_loader/skeleton_loader.js +1 -1
  37. package/dist/components/base/sorting/sorting.js +1 -1
  38. package/dist/components/base/tabs/tab/tab.js +1 -1
  39. package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -1
  40. package/dist/components/base/toast/toast.js +1 -1
  41. package/dist/components/base/toggle/toggle.js +1 -1
  42. package/dist/components/base/token_selector/helpers.js +1 -1
  43. package/dist/components/base/token_selector/token_selector.js +1 -1
  44. package/dist/components/base/token_selector/token_selector_dropdown.js +1 -1
  45. package/dist/components/charts/area/area.js +1 -1
  46. package/dist/components/charts/bar/bar.js +1 -2
  47. package/dist/components/charts/chart/chart.js +1 -1
  48. package/dist/components/charts/column/column.js +1 -1
  49. package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -1
  50. package/dist/components/charts/gauge/gauge.js +1 -3
  51. package/dist/components/charts/heatmap/heatmap.js +1 -1
  52. package/dist/components/charts/line/line.js +1 -1
  53. package/dist/components/charts/sparkline/sparkline.js +1 -2
  54. package/dist/components/charts/stacked_column/stacked_column.js +1 -2
  55. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +1 -1
  56. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +1 -2
  57. package/dist/components/dashboards/mock_data.js +1 -1
  58. package/dist/components/experimental/experiment_badge/experiment_badge.js +1 -1
  59. package/dist/components/utilities/intersection_observer/intersection_observer.js +1 -1
  60. package/dist/components/utilities/sprintf/sprintf.js +1 -2
  61. package/dist/directives/hover_load/hover_load.js +1 -1
  62. package/dist/directives/resize_observer/resize_observer.js +1 -1
  63. package/dist/utils/charts/config.js +1 -2
  64. package/dist/utils/charts/story_config.js +1 -1
  65. package/dist/utils/i18n.js +1 -1
  66. package/dist/utils/set_utils.js +1 -1
  67. package/dist/utils/use_mock_intersection_observer.js +1 -1
  68. package/package.json +4 -4
  69. package/src/components/base/accordion/accordion_item.vue +1 -1
  70. package/src/components/base/avatar/avatar.vue +1 -1
  71. package/src/components/base/avatar/utils.js +1 -1
  72. package/src/components/base/avatars_inline/avatars_inline.vue +1 -2
  73. package/src/components/base/breadcrumb/breadcrumb.vue +1 -1
  74. package/src/components/base/datepicker/datepicker.vue +1 -1
  75. package/src/components/base/daterange_picker/daterange_picker.vue +1 -1
  76. package/src/components/base/drawer/drawer.vue +1 -1
  77. package/src/components/base/dropdown/dropdown.vue +1 -1
  78. package/src/components/base/filtered_search/filtered_search.vue +1 -2
  79. package/src/components/base/filtered_search/filtered_search_token.vue +1 -2
  80. package/src/components/base/filtered_search/filtered_search_token_segment.vue +1 -1
  81. package/src/components/base/filtered_search/filtered_search_utils.js +1 -3
  82. package/src/components/base/form/form_character_count/form_character_count.vue +1 -1
  83. package/src/components/base/form/form_checkbox/form_checkbox.vue +5 -4
  84. package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -4
  85. package/src/components/base/form/form_combobox/form_combobox.vue +1 -1
  86. package/src/components/base/form/form_date/form_date.vue +1 -1
  87. package/src/components/base/form/form_fields/form_fields.vue +1 -3
  88. package/src/components/base/form/form_group/form_group.vue +1 -3
  89. package/src/components/base/form/form_input/form_input.vue +1 -5
  90. package/src/components/base/form/form_radio/form_radio.vue +220 -31
  91. package/src/components/base/form/form_select/form_select.vue +1 -1
  92. package/src/components/base/form/form_textarea/form_textarea.vue +1 -1
  93. package/src/components/base/infinite_scroll/infinite_scroll.vue +1 -1
  94. package/src/components/base/link/link.vue +1 -6
  95. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +1 -2
  96. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +1 -2
  97. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +1 -1
  98. package/src/components/base/new_dropdowns/disclosure/utils.js +1 -1
  99. package/src/components/base/new_dropdowns/listbox/listbox.vue +1 -2
  100. package/src/components/base/new_dropdowns/listbox/listbox_group.vue +1 -1
  101. package/src/components/base/new_dropdowns/listbox/utils.js +1 -2
  102. package/src/components/base/pagination/pagination.vue +1 -3
  103. package/src/components/base/path/path.vue +1 -2
  104. package/src/components/base/skeleton_loader/skeleton_loader.vue +1 -1
  105. package/src/components/base/sorting/sorting.vue +1 -1
  106. package/src/components/base/tabs/tab/tab.vue +1 -1
  107. package/src/components/base/tabs/tabs/scrollable_tabs.vue +1 -1
  108. package/src/components/base/toast/toast.js +1 -1
  109. package/src/components/base/toggle/toggle.vue +1 -1
  110. package/src/components/base/token_selector/helpers.js +1 -1
  111. package/src/components/base/token_selector/token_selector.vue +1 -1
  112. package/src/components/base/token_selector/token_selector_dropdown.vue +1 -1
  113. package/src/components/charts/area/area.vue +1 -1
  114. package/src/components/charts/bar/bar.vue +1 -2
  115. package/src/components/charts/chart/chart.vue +1 -1
  116. package/src/components/charts/column/column.vue +1 -1
  117. package/src/components/charts/discrete_scatter/discrete_scatter.vue +1 -1
  118. package/src/components/charts/gauge/gauge.vue +1 -3
  119. package/src/components/charts/heatmap/heatmap.vue +1 -1
  120. package/src/components/charts/line/line.vue +1 -1
  121. package/src/components/charts/sparkline/sparkline.vue +1 -2
  122. package/src/components/charts/stacked_column/stacked_column.vue +1 -2
  123. package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +1 -1
  124. package/src/components/dashboards/dashboard_panel/dashboard_panel.vue +1 -2
  125. package/src/components/dashboards/mock_data.js +1 -1
  126. package/src/components/experimental/experiment_badge/experiment_badge.vue +1 -1
  127. package/src/components/utilities/intersection_observer/intersection_observer.vue +1 -1
  128. package/src/components/utilities/sprintf/sprintf.vue +1 -2
  129. package/src/directives/hover_load/hover_load.js +1 -1
  130. package/src/directives/resize_observer/resize_observer.js +1 -1
  131. package/src/utils/charts/config.js +1 -2
  132. package/src/utils/charts/story_config.js +1 -1
  133. package/src/utils/i18n.js +1 -1
  134. package/src/utils/set_utils.js +1 -1
  135. package/src/utils/use_mock_intersection_observer.js +1 -1
  136. package/tailwind.defaults.js +1 -1
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import GlCollapse from '../collapse/collapse';
3
3
  import GlAnimatedChevronRightDownIcon from '../animated_icon/animated_chevron_right_down_icon';
4
4
  import GlButton from '../button/button';
@@ -1,4 +1,4 @@
1
- import isNumber from 'lodash/isNumber';
1
+ import { isNumber } from 'lodash-es';
2
2
  import { avatarSizeOptions, avatarShapeOptions } from '../../../utils/constants';
3
3
  import { getAvatarChar } from '../../../utils/string_utils';
4
4
  import { avatarSizeValidator } from './utils';
@@ -1,4 +1,4 @@
1
- import isNumber from 'lodash/isNumber';
1
+ import { isNumber } from 'lodash-es';
2
2
  import { avatarSizeOptions } from '../../../utils/constants';
3
3
 
4
4
  const avatarSizeValidator = value => {
@@ -1,5 +1,4 @@
1
- import truncate from 'lodash/truncate';
2
- import get from 'lodash/get';
1
+ import { get, truncate } from 'lodash-es';
3
2
  import { avatarsInlineSizeOptions } from '../../../utils/constants';
4
3
  import GlAvatar from '../avatar/avatar';
5
4
  import GlTooltip from '../tooltip/tooltip';
@@ -1,4 +1,4 @@
1
- import debounce from 'lodash/debounce';
1
+ import { debounce } from 'lodash-es';
2
2
  import { translate } from '../../../utils/i18n';
3
3
  import GlAvatar from '../avatar/avatar';
4
4
  import GlDisclosureDropdown from '../new_dropdowns/disclosure/disclosure_dropdown';
@@ -1,4 +1,4 @@
1
- import isString from 'lodash/isString';
1
+ import { isString } from 'lodash-es';
2
2
  import Pikaday from 'pikaday';
3
3
  import { defaultConfig } from '../../../config';
4
4
  import { defaultDateFormat, datepickerWidthOptionsMap } from '../../../utils/constants';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import { GlTooltipDirective } from '../../../directives/tooltip/tooltip';
3
3
  import { getDateInPast, getDateInFuture, getDayDifference } from '../../../utils/datetime_utility';
4
4
  import GlDatepicker from '../datepicker/datepicker';
@@ -1,4 +1,4 @@
1
- import isEmpty from 'lodash/isEmpty';
1
+ import { isEmpty } from 'lodash-es';
2
2
  import { maxZIndex, drawerVariants } from '../../../utils/constants';
3
3
  import GlButton from '../button/button';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue';
2
- import merge from 'lodash/merge';
2
+ import { merge } from 'lodash-es';
3
3
  import { selectAll } from '../../../vendor/bootstrap-vue/src/utils/dom';
4
4
  import { BDropdown } from '../../../vendor/bootstrap-vue/src/components/dropdown/dropdown';
5
5
  import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions } from '../../../utils/constants';
@@ -1,5 +1,4 @@
1
- import isEqual from 'lodash/isEqual';
2
- import cloneDeep from 'lodash/cloneDeep';
1
+ import { isEqual, cloneDeep } from 'lodash-es';
3
2
  import { PortalTarget } from 'portal-vue';
4
3
  import { GlTooltipDirective } from '../../../directives/tooltip/tooltip';
5
4
  import { logWarning } from '../../../utils/utils';
@@ -1,5 +1,4 @@
1
- import cloneDeep from 'lodash/cloneDeep';
2
- import isEqual from 'lodash/isEqual';
1
+ import { cloneDeep, isEqual } from 'lodash-es';
3
2
  import GlToken from '../token/token';
4
3
  import { stopEvent } from '../../../utils/utils';
5
4
  import GlFilteredSearchTokenSegment from './filtered_search_token_segment';
@@ -1,4 +1,4 @@
1
- import last from 'lodash/last';
1
+ import { last } from 'lodash-es';
2
2
  import { Portal } from 'portal-vue';
3
3
  import { LEFT_MOUSE_BUTTON } from '../../../utils/constants';
4
4
  import GlFilteredSearchSuggestion from './filtered_search_suggestion';
@@ -1,6 +1,4 @@
1
- import first from 'lodash/first';
2
- import last from 'lodash/last';
3
- import isString from 'lodash/isString';
1
+ import { first, last, isString } from 'lodash-es';
4
2
  import { modulo } from '../../../utils/number_utils';
5
3
 
6
4
  const TERM_TOKEN_TYPE = 'filtered-search-term';
@@ -1,4 +1,4 @@
1
- import debounce from 'lodash/debounce';
1
+ import { debounce } from 'lodash-es';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
4
  var script = {
@@ -1,5 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
2
- import isBoolean from 'lodash/isBoolean';
1
+ import { uniqueId, isBoolean } from 'lodash-es';
3
2
  import { looseEqual } from '../../../../vendor/bootstrap-vue/src/utils/loose-equal';
4
3
  import { looseIndexOf } from '../../../../vendor/bootstrap-vue/src/utils/loose-index-of';
5
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -93,7 +92,8 @@ var script = {
93
92
  * Value returned when this checkbox is checked.
94
93
  */
95
94
  value: {
96
- type: [Array, Boolean, String],
95
+ // `value` prop can be any type
96
+ type: undefined,
97
97
  required: false,
98
98
  default: true
99
99
  },
@@ -101,7 +101,8 @@ var script = {
101
101
  * Value returned when this checkbox is unchecked. Note not applicable when multiple checkboxes bound to the same v-model array.
102
102
  */
103
103
  uncheckedValue: {
104
- type: [Array, Boolean, String],
104
+ // `uncheckedValue` prop can be any type
105
+ type: undefined,
105
106
  required: false,
106
107
  default: false
107
108
  }
@@ -1,7 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
2
- import isBoolean from 'lodash/isBoolean';
3
- import omit from 'lodash/omit';
4
- import pick from 'lodash/pick';
1
+ import { uniqueId, isBoolean, omit, pick } from 'lodash-es';
5
2
  import { looseEqual } from '../../../../vendor/bootstrap-vue/src/utils/loose-equal';
6
3
  import { formOptionsMixin } from '../../../../vendor/bootstrap-vue/src/mixins/form-options';
7
4
  import { SafeHtmlDirective } from '../../../../directives/safe_html/safe_html';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import GlDropdownItem from '../../dropdown/dropdown_item';
3
3
  import GlDropdownDivider from '../../dropdown/dropdown_divider';
4
4
  import GlFormGroup from '../form_group/form_group';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import GlFormInput from '../form_input/form_input';
3
3
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
4
 
@@ -1,6 +1,4 @@
1
- import isFunction from 'lodash/isFunction';
2
- import mapValues from 'lodash/mapValues';
3
- import uniqueId from 'lodash/uniqueId';
1
+ import { mapValues, isFunction, uniqueId } from 'lodash-es';
4
2
  import GlFormGroup from '../form_group/form_group';
5
3
  import GlFormInput from '../form_input/form_input';
6
4
  import { setObjectProperty } from '../../../../utils/set_utils';
@@ -1,6 +1,4 @@
1
- import isString from 'lodash/isString';
2
- import isPlainObject from 'lodash/isPlainObject';
3
- import { uniqueId } from 'lodash';
1
+ import { uniqueId, isString, isPlainObject } from 'lodash-es';
4
2
  import { BFormGroup } from '../../../../vendor/bootstrap-vue/src/components/form-group/form-group';
5
3
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
4
 
@@ -1,8 +1,4 @@
1
- import isObject from 'lodash/isObject';
2
- import uniqueId from 'lodash/uniqueId';
3
- import isBoolean from 'lodash/isBoolean';
4
- import toInteger from 'lodash/toInteger';
5
- import toString from 'lodash/toString';
1
+ import { isObject, toString, isBoolean, toInteger, uniqueId } from 'lodash-es';
6
2
  import { toFloat } from '../../../../utils/number_utils';
7
3
  import { stopEvent, isVisible } from '../../../../utils/utils';
8
4
  import { formInputWidths } from '../../../../utils/constants';
@@ -1,27 +1,225 @@
1
- import { BFormRadio } from '../../../../vendor/bootstrap-vue/src/components/form-radio/form-radio';
1
+ import uniqueId from 'lodash/uniqueId';
2
+ import isBoolean from 'lodash/isBoolean';
3
+ import { looseEqual } from '../../../../vendor/bootstrap-vue/src/utils/loose-equal';
2
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
5
 
4
- const {
5
- model
6
- } = BFormRadio.options;
7
6
  var script = {
8
7
  name: 'GlFormRadio',
9
- components: {
10
- BFormRadio
8
+ inject: {
9
+ getGroup: {
10
+ // When we remove BFormRadioGroup from GlFormRadioGroup, we can rename
11
+ // the `getBvRadioGroup` provide to `getRadioGroup`.
12
+ from: 'getBvRadioGroup',
13
+ default: () => () => null
14
+ }
11
15
  },
12
16
  inheritAttrs: false,
13
17
  model: {
14
- prop: model.prop,
15
- event: model.event
18
+ prop: 'checked',
19
+ event: 'input'
16
20
  },
17
21
  props: {
18
22
  /**
19
- * Whether the radio is checked
23
+ * Used to set the `id` attribute on the rendered content, and used as the base to generate any additional element IDs as needed.
24
+ */
25
+ id: {
26
+ type: String,
27
+ required: false,
28
+ default: undefined
29
+ },
30
+ /**
31
+ * The current value of the radio. When bound to multiple radios, this is the value of the currently selected radio.
20
32
  */
21
33
  checked: {
22
- type: [String, Number, Boolean, Object],
34
+ // `checked` prop can be any type
35
+ type: undefined,
36
+ required: false,
37
+ default: null
38
+ },
39
+ /**
40
+ * When set to `true`, disables the component's functionality and places it in a disabled state.
41
+ */
42
+ disabled: {
43
+ type: Boolean,
23
44
  required: false,
24
45
  default: false
46
+ },
47
+ /**
48
+ * Sets the value of the `name` attribute on the form control.
49
+ */
50
+ name: {
51
+ type: String,
52
+ required: false,
53
+ default: undefined
54
+ },
55
+ /**
56
+ * Adds the `required` attribute to the form control.
57
+ */
58
+ required: {
59
+ type: Boolean,
60
+ required: false,
61
+ default: false
62
+ },
63
+ /**
64
+ * Controls the validation state appearance of the component. `true` for valid, `false` for invalid, or `null` for no validation state.
65
+ */
66
+ state: {
67
+ type: Boolean,
68
+ required: false,
69
+ default: null
70
+ },
71
+ /**
72
+ * Value returned when this radio is selected.
73
+ */
74
+ value: {
75
+ // `value` prop can be any type
76
+ type: undefined,
77
+ required: false,
78
+ default: true
79
+ }
80
+ },
81
+ data() {
82
+ const group = this.getGroup();
83
+ return {
84
+ internalId: this.id ? this.id : uniqueId('gitlab_ui_radio_'),
85
+ localChecked: group ? group.checked : this.checked
86
+ };
87
+ },
88
+ computed: {
89
+ computedLocalChecked: {
90
+ get() {
91
+ return this.isGroup ? this.group.localChecked : this.localChecked;
92
+ },
93
+ set(value) {
94
+ if (this.isGroup) {
95
+ this.group.localChecked = value;
96
+ } else {
97
+ this.localChecked = value;
98
+ }
99
+ }
100
+ },
101
+ group() {
102
+ return this.getGroup();
103
+ },
104
+ isGroup() {
105
+ // Is this radio a child of radio-group?
106
+ return Boolean(this.group);
107
+ },
108
+ computedState() {
109
+ if (this.isGroup) return this.group.computedState;
110
+ return isBoolean(this.state) ? this.state : null;
111
+ },
112
+ stateClass() {
113
+ if (this.computedState === true) return 'is-valid';
114
+ if (this.computedState === false) return 'is-invalid';
115
+ return null;
116
+ },
117
+ computedAriaInvalid() {
118
+ return this.computedState === false ? 'true' : null;
119
+ },
120
+ isChecked() {
121
+ return looseEqual(this.computedLocalChecked, this.value);
122
+ },
123
+ isDisabled() {
124
+ // Child can be disabled while parent isn't, but is always disabled if group is
125
+ return this.isGroup ? this.group.disabled || this.disabled : this.disabled;
126
+ },
127
+ isRequired() {
128
+ // Required only works when a name is provided for the input(s)
129
+ // Child can only be required when parent is
130
+ // Groups will always have a name (either user supplied or auto generated)
131
+ return this.computedName && (this.isGroup ? this.group.required : this.required);
132
+ },
133
+ computedName() {
134
+ // Group name preferred over local name
135
+ return (this.isGroup ? this.group.groupName : this.name) || null;
136
+ },
137
+ computedAttrs() {
138
+ const {
139
+ isDisabled: disabled,
140
+ isRequired: required,
141
+ value,
142
+ isChecked: checked
143
+ } = this;
144
+ return {
145
+ ...this.$attrs,
146
+ id: this.internalId,
147
+ name: this.computedName,
148
+ disabled,
149
+ required,
150
+ value,
151
+ checked,
152
+ 'aria-required': required || null,
153
+ 'aria-invalid': this.computedAriaInvalid
154
+ };
155
+ }
156
+ },
157
+ watch: {
158
+ checked() {
159
+ this.checkedWatcher(...arguments);
160
+ },
161
+ computedLocalChecked() {
162
+ this.computedLocalCheckedWatcher(...arguments);
163
+ }
164
+ },
165
+ methods: {
166
+ checkedWatcher(newValue) {
167
+ if (!looseEqual(newValue, this.computedLocalChecked)) {
168
+ this.computedLocalChecked = newValue;
169
+ }
170
+ },
171
+ computedLocalCheckedWatcher(newValue, oldValue) {
172
+ if (!looseEqual(newValue, oldValue)) {
173
+ /**
174
+ * Emitted when the selected value is changed
175
+ *
176
+ * @event input
177
+ * @type {boolean} current selected value of radio group
178
+ */
179
+ this.$emit('input', newValue);
180
+ }
181
+ },
182
+ handleChange() {
183
+ const {
184
+ value
185
+ } = this;
186
+
187
+ // Update `computedLocalChecked`
188
+ this.computedLocalChecked = value;
189
+
190
+ // Fire events in a `$nextTick()` to ensure the `v-model` is updated
191
+ this.$nextTick(() => {
192
+ /**
193
+ * Emitted when the selected value is changed due to user interaction
194
+ *
195
+ * @event change
196
+ * @type {boolean} current selected value of radio group
197
+ */
198
+ this.$emit('change', value);
199
+
200
+ // If this is a child of a group, we emit a change event on it as well
201
+ if (this.isGroup) {
202
+ /**
203
+ * Emitted when the selected value is changed due to user interaction
204
+ *
205
+ * @event change
206
+ * @type {boolean} current selected value of radio group
207
+ */
208
+ this.group.$emit('change', value);
209
+ }
210
+ });
211
+ },
212
+ focus() {
213
+ if (!this.disabled) {
214
+ var _this$$refs$input;
215
+ (_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 ? void 0 : _this$$refs$input.focus();
216
+ }
217
+ },
218
+ blur() {
219
+ if (!this.disabled) {
220
+ var _this$$refs$input2;
221
+ (_this$$refs$input2 = this.$refs.input) === null || _this$$refs$input2 === void 0 ? void 0 : _this$$refs$input2.blur();
222
+ }
25
223
  }
26
224
  }
27
225
  };
@@ -30,7 +228,7 @@ var script = {
30
228
  const __vue_script__ = script;
31
229
 
32
230
  /* template */
33
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-radio',_vm._b({staticClass:"gl-form-radio",attrs:{"checked":_vm.checked},on:{"input":function($event){return _vm.$emit('input', $event)},"change":function($event){return _vm.$emit('change', $event)}}},'b-form-radio',_vm.$attrs,false),[_vm._t("default"),_vm._v(" "),(_vm.$scopedSlots.help)?_c('p',{staticClass:"help-text"},[_vm._t("help")],2):_vm._e()],2)};
231
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-form-radio custom-radio custom-control"},[_c('input',_vm._b({key:"input",ref:"input",staticClass:"custom-control-input",class:_vm.stateClass,attrs:{"type":"radio"},on:{"change":_vm.handleChange}},'input',_vm.computedAttrs,false)),_vm._v(" "),_c('label',{staticClass:"custom-control-label",attrs:{"for":_vm.internalId}},[_vm._t("default"),_vm._v(" "),(Boolean(_vm.$scopedSlots.help))?_c('p',{staticClass:"help-text"},[_vm._t("help")],2):_vm._e()],2)])};
34
232
  var __vue_staticRenderFns__ = [];
35
233
 
36
234
  /* style */
@@ -1,4 +1,4 @@
1
- import isObject from 'lodash/isObject';
1
+ import { isObject } from 'lodash-es';
2
2
  import { BFormSelect } from '../../../../vendor/bootstrap-vue/src/components/form-select/form-select';
3
3
  import { formInputWidths } from '../../../../utils/constants';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import { BFormTextarea } from '../../../../vendor/bootstrap-vue/src/components/form-textarea/form-textarea';
3
3
  import GlFormCharacterCount from '../form_character_count/form_character_count';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -1,4 +1,4 @@
1
- import throttle from 'lodash/throttle';
1
+ import { throttle } from 'lodash-es';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
4
  const throttleDuration = 1000;
@@ -1,9 +1,4 @@
1
- import isFunction from 'lodash/isFunction';
2
- import isString from 'lodash/isString';
3
- import isObject from 'lodash/isObject';
4
- import toString from 'lodash/toString';
5
- import isBoolean from 'lodash/isBoolean';
6
- import concat from 'lodash/concat';
1
+ import { isString, isObject, toString, isBoolean, concat, isFunction } from 'lodash-es';
7
2
  import { SafeLinkDirective, isExternalURL } from '../../../directives/safe_link/safe_link';
8
3
  import { stopEvent } from '../../../utils/utils';
9
4
  import { isEvent } from '../../../vendor/bootstrap-vue/src/utils/inspect';
@@ -1,5 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
2
- import isBoolean from 'lodash/isBoolean';
1
+ import { uniqueId, isBoolean } from 'lodash-es';
3
2
  import { offset, autoPlacement, shift, arrow, size, autoUpdate, computePosition } from '@floating-ui/dom';
4
3
  import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions, dropdownPlacements, dropdownAllowedAutoPlacements } from '../../../../utils/constants';
5
4
  import { POSITION_ABSOLUTE, POSITION_FIXED, GL_DROPDOWN_CONTENTS_CLASS, GL_DROPDOWN_BEFORE_CLOSE, GL_DROPDOWN_SHOWN, GL_DROPDOWN_HIDDEN, KEY_CODE_ESCAPE, ENTER, SPACE, ARROW_DOWN, GL_DROPDOWN_FOCUS_CONTENT } from '../constants';
@@ -1,5 +1,4 @@
1
- import clamp from 'lodash/clamp';
2
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId, clamp } from 'lodash-es';
3
2
  import { stopEvent, filterVisible } from '../../../../utils/utils';
4
3
  import { GL_DROPDOWN_SHOWN, GL_DROPDOWN_HIDDEN, GL_DROPDOWN_BEFORE_CLOSE, GL_DROPDOWN_FOCUS_CONTENT, POSITION_ABSOLUTE, POSITION_FIXED, HOME, END, ARROW_UP, ARROW_DOWN, ENTER, SPACE, GL_DROPDOWN_CONTENTS_CLASS } from '../constants';
5
4
  import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions, dropdownPlacements } from '../../../../utils/constants';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import GlDisclosureDropdownItem from './disclosure_dropdown_item';
3
3
  import { isGroup, doSomeItemsHaveIcon } from './utils';
4
4
  import { DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS, DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue';
2
- import isFunction from 'lodash/isFunction';
2
+ import { isFunction } from 'lodash-es';
3
3
  import { DISCLOSURE_DROPDOWN_ITEM_NAME, DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
4
4
 
5
5
  const itemValidator = item => {
@@ -1,5 +1,4 @@
1
- import clamp from 'lodash/clamp';
2
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId, clamp } from 'lodash-es';
3
2
  import { logWarning, stopEvent } from '../../../../utils/utils';
4
3
  import { GL_DROPDOWN_SHOWN, GL_DROPDOWN_HIDDEN, GL_DROPDOWN_FOCUS_CONTENT, POSITION_ABSOLUTE, POSITION_FIXED, GL_DROPDOWN_CONTENTS_CLASS, ENTER, ARROW_DOWN, ARROW_UP, END, HOME } from '../constants';
5
4
  import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions, dropdownPlacements } from '../../../../utils/constants';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
4
  var script = {
@@ -1,5 +1,4 @@
1
- import isNumber from 'lodash/isNumber';
2
- import isString from 'lodash/isString';
1
+ import { isString, isNumber } from 'lodash-es';
3
2
 
4
3
  const isOption = item => Boolean(item) && (isString(item.value) || isNumber(item.value) || item.value === null);
5
4
 
@@ -1,6 +1,4 @@
1
- import debounce from 'lodash/debounce';
2
- import isFunction from 'lodash/isFunction';
3
- import range from 'lodash/range';
1
+ import { isFunction, debounce, range } from 'lodash-es';
4
2
  import { breakpoints, GlBreakpointInstance } from '../../../utils/breakpoints';
5
3
  import { alignOptions, resizeDebounceTime } from '../../../utils/constants';
6
4
  import { translate, sprintf } from '../../../utils/i18n';
@@ -1,6 +1,5 @@
1
1
  import iconSpriteInfo from '@gitlab/svgs/dist/icons.json';
2
- import uniqueId from 'lodash/uniqueId';
3
- import findLast from 'lodash/findLast';
2
+ import { uniqueId, findLast } from 'lodash-es';
4
3
  import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
5
4
  import GlIcon from '../icon/icon';
6
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -1,4 +1,4 @@
1
- import range from 'lodash/range';
1
+ import { range } from 'lodash-es';
2
2
  import { uid } from '../../../utils/utils';
3
3
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import { GlTooltipDirective } from '../../../directives/tooltip/tooltip';
3
3
  import GlButton from '../button/button';
4
4
  import GlButtonGroup from '../button_group/button_group';
@@ -1,4 +1,4 @@
1
- import isPlainObject from 'lodash/isPlainObject';
1
+ import { isPlainObject } from 'lodash-es';
2
2
  import { BTab } from '../../../../vendor/bootstrap-vue/src/components/tabs/tab';
3
3
  import GlBadge from '../../badge/badge';
4
4
  import { logWarning } from '../../../../utils/utils';
@@ -1,4 +1,4 @@
1
- import debounce from 'lodash/debounce';
1
+ import { debounce } from 'lodash-es';
2
2
  import { GlResizeObserverDirective } from '../../../../directives/resize_observer/resize_observer';
3
3
  import GlIcon from '../../icon/icon';
4
4
  import { translate } from '../../../../utils/i18n';
@@ -1,4 +1,4 @@
1
- import isFunction from 'lodash/isFunction';
1
+ import { isFunction } from 'lodash-es';
2
2
  import { ToastPlugin } from '../../../vendor/bootstrap-vue/src/components/toast/index';
3
3
  import CloseButton from '../../shared_components/close_button/close_button';
4
4
 
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import { toggleLabelPosition } from '../../../utils/constants';
3
3
  import GlIcon from '../icon/icon';
4
4
  import GlLoadingIcon from '../loading_icon/loading_icon';
@@ -1,4 +1,4 @@
1
- import has from 'lodash/has';
1
+ import { has } from 'lodash-es';
2
2
 
3
3
  const tokensValidator = tokens => tokens.every(token => has(token, 'id'));
4
4
 
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import { tokensValidator } from './helpers';
3
3
  import GlTokenContainer from './token_container';
4
4
  import GlTokenSelectorDropdown from './token_selector_dropdown';
@@ -1,4 +1,4 @@
1
- import uniqueId from 'lodash/uniqueId';
1
+ import { uniqueId } from 'lodash-es';
2
2
  import GlDropdownItem from '../dropdown/dropdown_item';
3
3
  import { tokensValidator } from './helpers';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -1,4 +1,4 @@
1
- import merge from 'lodash/merge';
1
+ import { merge } from 'lodash-es';
2
2
  import { defaultAreaOpacity, lineStyle, getThresholdConfig, generateAnnotationSeries, defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions, mergeAnnotationAxisToOptions, grid } from '../../../utils/charts/config';
3
3
  import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
4
4
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';
@@ -1,5 +1,4 @@
1
- import merge from 'lodash/merge';
2
- import truncate from 'lodash/truncate';
1
+ import { merge, truncate } from 'lodash-es';
3
2
  import { dataZoomAdjustments, mergeSeriesToOptions, grid } from '../../../utils/charts/config';
4
3
  import { CHART_DEFAULT_SERIES_STACK, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
5
4
  import { colorFromDefaultPalette } from '../../../utils/charts/theme';