@gitlab/ui 129.0.0 → 129.1.1
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.
- package/dist/components/base/accordion/accordion_item.js +1 -1
- package/dist/components/base/avatar/avatar.js +1 -1
- package/dist/components/base/avatar/utils.js +1 -1
- package/dist/components/base/avatars_inline/avatars_inline.js +1 -2
- package/dist/components/base/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/base/datepicker/datepicker.js +1 -1
- package/dist/components/base/daterange_picker/daterange_picker.js +1 -1
- package/dist/components/base/drawer/drawer.js +1 -1
- package/dist/components/base/dropdown/dropdown.js +1 -1
- package/dist/components/base/filtered_search/filtered_search.js +1 -2
- package/dist/components/base/filtered_search/filtered_search_token.js +1 -2
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +1 -1
- package/dist/components/base/filtered_search/filtered_search_utils.js +1 -3
- package/dist/components/base/form/form_character_count/form_character_count.js +1 -1
- package/dist/components/base/form/form_checkbox/form_checkbox.js +1 -2
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -4
- package/dist/components/base/form/form_combobox/form_combobox.js +1 -1
- package/dist/components/base/form/form_date/form_date.js +1 -1
- package/dist/components/base/form/form_fields/form_fields.js +1 -3
- package/dist/components/base/form/form_group/form_group.js +1 -3
- package/dist/components/base/form/form_input/form_input.js +1 -5
- package/dist/components/base/form/form_select/form_select.js +1 -1
- package/dist/components/base/form/form_textarea/form_textarea.js +1 -1
- package/dist/components/base/infinite_scroll/infinite_scroll.js +1 -1
- package/dist/components/base/link/link.js +1 -6
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +1 -2
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +1 -2
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/utils.js +1 -1
- package/dist/components/base/new_dropdowns/listbox/listbox.js +1 -2
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +1 -1
- package/dist/components/base/new_dropdowns/listbox/utils.js +1 -2
- package/dist/components/base/pagination/pagination.js +1 -3
- package/dist/components/base/path/path.js +1 -2
- package/dist/components/base/skeleton_loader/skeleton_loader.js +1 -1
- package/dist/components/base/sorting/sorting.js +1 -1
- package/dist/components/base/tabs/tab/tab.js +1 -1
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -1
- package/dist/components/base/toast/toast.js +1 -1
- package/dist/components/base/toggle/toggle.js +1 -1
- package/dist/components/base/token_selector/helpers.js +1 -1
- package/dist/components/base/token_selector/token_selector.js +1 -1
- package/dist/components/base/token_selector/token_selector_dropdown.js +1 -1
- package/dist/components/charts/area/area.js +1 -1
- package/dist/components/charts/bar/bar.js +1 -2
- package/dist/components/charts/chart/chart.js +1 -1
- package/dist/components/charts/column/column.js +1 -1
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -1
- package/dist/components/charts/gauge/gauge.js +1 -3
- package/dist/components/charts/heatmap/heatmap.js +1 -1
- package/dist/components/charts/line/line.js +1 -1
- package/dist/components/charts/sparkline/sparkline.js +1 -2
- package/dist/components/charts/stacked_column/stacked_column.js +1 -2
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +1 -1
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +1 -2
- package/dist/components/dashboards/mock_data.js +1 -1
- package/dist/components/experimental/experiment_badge/experiment_badge.js +1 -1
- package/dist/components/utilities/intersection_observer/intersection_observer.js +1 -1
- package/dist/components/utilities/sprintf/sprintf.js +1 -2
- package/dist/directives/hover_load/hover_load.js +1 -1
- package/dist/directives/resize_observer/resize_observer.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utils/charts/config.js +1 -2
- package/dist/utils/charts/story_config.js +1 -1
- package/dist/utils/i18n.js +1 -1
- package/dist/utils/set_utils.js +1 -1
- package/dist/utils/use_mock_intersection_observer.js +1 -1
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +4 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +4 -2
- package/dist/vendor/bootstrap-vue/src/utils/props.js +2 -32
- package/package.json +4 -4
- package/src/components/base/accordion/accordion_item.vue +1 -1
- package/src/components/base/avatar/avatar.vue +1 -1
- package/src/components/base/avatar/utils.js +1 -1
- package/src/components/base/avatars_inline/avatars_inline.vue +1 -2
- package/src/components/base/breadcrumb/breadcrumb.vue +1 -1
- package/src/components/base/datepicker/datepicker.vue +1 -1
- package/src/components/base/daterange_picker/daterange_picker.vue +1 -1
- package/src/components/base/drawer/drawer.vue +1 -1
- package/src/components/base/dropdown/dropdown.vue +1 -1
- package/src/components/base/filtered_search/filtered_search.vue +1 -2
- package/src/components/base/filtered_search/filtered_search_token.vue +1 -2
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +1 -1
- package/src/components/base/filtered_search/filtered_search_utils.js +1 -3
- package/src/components/base/form/form_character_count/form_character_count.vue +1 -1
- package/src/components/base/form/form_checkbox/form_checkbox.vue +1 -2
- package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -4
- package/src/components/base/form/form_combobox/form_combobox.vue +1 -1
- package/src/components/base/form/form_date/form_date.vue +1 -1
- package/src/components/base/form/form_fields/form_fields.vue +1 -3
- package/src/components/base/form/form_group/form_group.vue +1 -3
- package/src/components/base/form/form_input/form_input.scss +215 -0
- package/src/components/base/form/form_input/form_input.vue +1 -5
- package/src/components/base/form/form_select/form_select.vue +1 -1
- package/src/components/base/form/form_textarea/form_textarea.vue +1 -1
- package/src/components/base/infinite_scroll/infinite_scroll.vue +1 -1
- package/src/components/base/link/link.vue +1 -6
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +1 -2
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +1 -2
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +1 -1
- package/src/components/base/new_dropdowns/disclosure/utils.js +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox.vue +1 -2
- package/src/components/base/new_dropdowns/listbox/listbox_group.vue +1 -1
- package/src/components/base/new_dropdowns/listbox/utils.js +1 -2
- package/src/components/base/pagination/pagination.vue +1 -3
- package/src/components/base/path/path.vue +1 -2
- package/src/components/base/skeleton_loader/skeleton_loader.vue +1 -1
- package/src/components/base/sorting/sorting.vue +1 -1
- package/src/components/base/tabs/tab/tab.vue +1 -1
- package/src/components/base/tabs/tabs/scrollable_tabs.vue +1 -1
- package/src/components/base/toast/toast.js +1 -1
- package/src/components/base/toggle/toggle.vue +1 -1
- package/src/components/base/token_selector/helpers.js +1 -1
- package/src/components/base/token_selector/token_selector.vue +1 -1
- package/src/components/base/token_selector/token_selector_dropdown.vue +1 -1
- package/src/components/charts/area/area.vue +1 -1
- package/src/components/charts/bar/bar.vue +1 -2
- package/src/components/charts/chart/chart.vue +1 -1
- package/src/components/charts/column/column.vue +1 -1
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +1 -1
- package/src/components/charts/gauge/gauge.vue +1 -3
- package/src/components/charts/heatmap/heatmap.vue +1 -1
- package/src/components/charts/line/line.vue +1 -1
- package/src/components/charts/sparkline/sparkline.vue +1 -2
- package/src/components/charts/stacked_column/stacked_column.vue +1 -2
- package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +1 -1
- package/src/components/dashboards/dashboard_panel/dashboard_panel.vue +1 -2
- package/src/components/dashboards/mock_data.js +1 -1
- package/src/components/experimental/experiment_badge/experiment_badge.vue +1 -1
- package/src/components/utilities/intersection_observer/intersection_observer.vue +1 -1
- package/src/components/utilities/sprintf/sprintf.vue +1 -2
- package/src/directives/hover_load/hover_load.js +1 -1
- package/src/directives/resize_observer/resize_observer.js +1 -1
- package/src/scss/bootstrap_vue.scss +0 -1
- package/src/utils/charts/config.js +1 -2
- package/src/utils/charts/story_config.js +1 -1
- package/src/utils/i18n.js +1 -1
- package/src/utils/set_utils.js +1 -1
- package/src/utils/use_mock_intersection_observer.js +1 -1
- package/src/vendor/bootstrap-vue/src/components/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +3 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-text.js +4 -2
- package/src/vendor/bootstrap-vue/src/utils/props.js +1 -33
- package/tailwind.defaults.js +1 -1
- package/src/vendor/bootstrap-vue/src/components/form-input/_form-input.scss +0 -219
- package/src/vendor/bootstrap-vue/src/components/form-input/index.scss +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import castArray from 'lodash
|
|
2
|
-
import merge from 'lodash/merge';
|
|
1
|
+
import { merge, castArray } from 'lodash-es';
|
|
3
2
|
import { BLUE_500 } from '../../tokens/build/js/tokens';
|
|
4
3
|
import { GlBreakpointInstance } from '../breakpoints';
|
|
5
4
|
import { areDatesEqual } from '../datetime_utility';
|
package/dist/utils/i18n.js
CHANGED
package/dist/utils/set_utils.js
CHANGED
|
@@ -6,10 +6,10 @@ import { RX_DIGITS, RX_SPACES } from '../../../constants/regex';
|
|
|
6
6
|
import { concat } from '../../../utils/array';
|
|
7
7
|
import { cloneDeep } from '../../../utils/clone-deep';
|
|
8
8
|
import { identity } from '../../../utils/identity';
|
|
9
|
-
import { isString, isRegExp
|
|
9
|
+
import { isFunction, isString, isRegExp } from '../../../utils/inspect';
|
|
10
10
|
import { looseEqual } from '../../../utils/loose-equal';
|
|
11
11
|
import { toInteger } from '../../../utils/number';
|
|
12
|
-
import { makeProp
|
|
12
|
+
import { makeProp } from '../../../utils/props';
|
|
13
13
|
import { escapeRegExp } from '../../../utils/string';
|
|
14
14
|
import { warn } from '../../../utils/warn';
|
|
15
15
|
import { stringifyRecordValues } from './stringify-record-values';
|
|
@@ -81,7 +81,8 @@ const filteringMixin = extend({
|
|
|
81
81
|
const {
|
|
82
82
|
filterFunction
|
|
83
83
|
} = this;
|
|
84
|
-
|
|
84
|
+
// `filterFunction` is an optional Function prop with no default
|
|
85
|
+
return isFunction(filterFunction) ? filterFunction : null;
|
|
85
86
|
},
|
|
86
87
|
// Returns the records in `localItems` that match the filter criteria
|
|
87
88
|
// Returns the original `localItems` array if not sorting
|
|
@@ -7,7 +7,8 @@ import { mathMax } from '../utils/math';
|
|
|
7
7
|
import { makeModelMixin } from '../utils/model';
|
|
8
8
|
import { toInteger, toFloat } from '../utils/number';
|
|
9
9
|
import { sortKeys } from '../utils/object';
|
|
10
|
-
import {
|
|
10
|
+
import { isFunction } from '../utils/inspect';
|
|
11
|
+
import { makeProp } from '../utils/props';
|
|
11
12
|
import { toString } from '../utils/string';
|
|
12
13
|
|
|
13
14
|
// --- Constants ---
|
|
@@ -78,7 +79,8 @@ const formTextMixin = extend({
|
|
|
78
79
|
return mathMax(toInteger(this.debounce, 0), 0);
|
|
79
80
|
},
|
|
80
81
|
hasFormatter() {
|
|
81
|
-
|
|
82
|
+
// `formatter` is an optional Function prop with no default
|
|
83
|
+
return isFunction(this.formatter);
|
|
82
84
|
}
|
|
83
85
|
},
|
|
84
86
|
watch: {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PROP_TYPE_ANY } from '../constants/props';
|
|
2
|
-
import { cloneDeep } from './clone-deep';
|
|
3
|
-
import { getComponentConfig } from './config';
|
|
4
2
|
import { identity } from './identity';
|
|
5
|
-
import { isUndefined, isObject, isArray
|
|
3
|
+
import { isUndefined, isObject, isArray } from './inspect';
|
|
6
4
|
import { hasOwnProperty, clone, keys } from './object';
|
|
7
5
|
import { upperFirst } from './string';
|
|
8
6
|
|
|
@@ -66,32 +64,4 @@ const pluckProps = function (keysToPluck, objToPluck) {
|
|
|
66
64
|
}, {});
|
|
67
65
|
};
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
// Replaces the current `default` key of each prop with a `getComponentConfig()`
|
|
71
|
-
// call that falls back to the current default value of the prop
|
|
72
|
-
const makePropConfigurable = (prop, key, componentKey) => ({
|
|
73
|
-
...cloneDeep(prop),
|
|
74
|
-
default: function bvConfigurablePropDefault() {
|
|
75
|
-
const value = getComponentConfig(componentKey, key, prop.default);
|
|
76
|
-
return isFunction(value) ? value() : value;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Make a props object configurable by global configuration
|
|
81
|
-
// Replaces the current `default` key of each prop with a `getComponentConfig()`
|
|
82
|
-
// call that falls back to the current default value of the prop
|
|
83
|
-
const makePropsConfigurable = (props, componentKey) => keys(props).reduce((result, key) => ({
|
|
84
|
-
...result,
|
|
85
|
-
[key]: makePropConfigurable(props[key], key, componentKey)
|
|
86
|
-
}), {});
|
|
87
|
-
|
|
88
|
-
// Get function name we use in `makePropConfigurable()`
|
|
89
|
-
// for the prop default value override to compare
|
|
90
|
-
// against in `hasPropFunction()`
|
|
91
|
-
const configurablePropDefaultFnName = makePropConfigurable({}, '', '').default.name;
|
|
92
|
-
|
|
93
|
-
// Detect wether the given value is currently a function
|
|
94
|
-
// and isn't the props default function
|
|
95
|
-
const hasPropFunction = fn => isFunction(fn) && fn.name && fn.name !== configurablePropDefaultFnName;
|
|
96
|
-
|
|
97
|
-
export { copyProps, hasPropFunction, makeProp, makePropConfigurable, makePropsConfigurable, pluckProps, suffixPropName };
|
|
67
|
+
export { copyProps, makeProp, pluckProps, suffixPropName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "129.
|
|
3
|
+
"version": "129.1.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"echarts": "^5.6.0",
|
|
71
71
|
"gridstack": "^12.4.2",
|
|
72
72
|
"iframe-resizer": "^4.4.5",
|
|
73
|
-
"lodash": "^4.17.23",
|
|
73
|
+
"lodash-es": "^4.17.23",
|
|
74
74
|
"popper.js": "^1.16.1",
|
|
75
75
|
"portal-vue": "2.1.7",
|
|
76
76
|
"vue-functional-data-merge": "^3.1.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"chokidar": "^4.0.3",
|
|
89
89
|
"sane": "^5.0.1",
|
|
90
90
|
"jackspeak": "2.1.1",
|
|
91
|
-
"postcss": "8.5.
|
|
91
|
+
"postcss": "8.5.8",
|
|
92
92
|
"json5": "2.2.3",
|
|
93
93
|
"rollup-plugin-vue/@vue/component-compiler/postcss-modules-sync/generic-names/loader-utils": "3.3.1"
|
|
94
94
|
},
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"pikaday": "^1.8.0",
|
|
150
150
|
"playwright": "^1.58.2",
|
|
151
151
|
"playwright-core": "^1.58.2",
|
|
152
|
-
"postcss": "8.5.
|
|
152
|
+
"postcss": "8.5.8",
|
|
153
153
|
"postcss-loader": "8.2.1",
|
|
154
154
|
"postcss-scss": "4.0.9",
|
|
155
155
|
"react": "18.3.1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import uniqueId from 'lodash
|
|
2
|
+
import { uniqueId } from 'lodash-es';
|
|
3
3
|
import GlCollapse from '../collapse/collapse.vue';
|
|
4
4
|
import GlAnimatedChevronRightDownIcon from '../animated_icon/animated_chevron_right_down_icon.vue';
|
|
5
5
|
import GlButton from '../button/button.vue';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isNumber from 'lodash
|
|
2
|
+
import { isNumber } from 'lodash-es';
|
|
3
3
|
import { avatarShapeOptions, avatarSizeOptions } from '../../../utils/constants';
|
|
4
4
|
import { getAvatarChar } from '../../../utils/string_utils';
|
|
5
5
|
import { avatarSizeValidator } from './utils';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import truncate from 'lodash
|
|
3
|
-
import get from 'lodash/get';
|
|
2
|
+
import { truncate, get } from 'lodash-es';
|
|
4
3
|
import { avatarsInlineSizeOptions } from '../../../utils/constants';
|
|
5
4
|
import GlAvatar from '../avatar/avatar.vue';
|
|
6
5
|
import GlTooltip from '../tooltip/tooltip.vue';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import debounce from 'lodash
|
|
2
|
+
import { debounce } from 'lodash-es';
|
|
3
3
|
import { translate } from '../../../utils/i18n';
|
|
4
4
|
import GlAvatar from '../avatar/avatar.vue';
|
|
5
5
|
import GlDisclosureDropdown from '../new_dropdowns/disclosure/disclosure_dropdown.vue';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import uniqueId from 'lodash
|
|
2
|
+
import { uniqueId } from 'lodash-es';
|
|
3
3
|
import { GlTooltipDirective } from '../../../directives/tooltip/tooltip';
|
|
4
4
|
import { getDayDifference, getDateInPast, getDateInFuture } from '../../../utils/datetime_utility';
|
|
5
5
|
import GlDatepicker from '../datepicker/datepicker.vue';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- eslint-disable vue/one-component-per-file -->
|
|
2
2
|
<script>
|
|
3
3
|
import Vue from 'vue';
|
|
4
|
-
import merge from 'lodash
|
|
4
|
+
import { merge } from 'lodash-es';
|
|
5
5
|
import { selectAll } from '../../../vendor/bootstrap-vue/src/utils/dom';
|
|
6
6
|
import { BDropdown } from '../../../vendor/bootstrap-vue/src/components/dropdown/dropdown';
|
|
7
7
|
import {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isEqual from 'lodash
|
|
3
|
-
import cloneDeep from 'lodash/cloneDeep';
|
|
2
|
+
import { isEqual, cloneDeep } from 'lodash-es';
|
|
4
3
|
import { PortalTarget } from 'portal-vue';
|
|
5
4
|
import { GlTooltipDirective } from '../../../directives/tooltip/tooltip';
|
|
6
5
|
import { logWarning } from '../../../utils/utils';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import cloneDeep from 'lodash
|
|
3
|
-
import isEqual from 'lodash/isEqual';
|
|
2
|
+
import { cloneDeep, isEqual } from 'lodash-es';
|
|
4
3
|
import GlToken from '../token/token.vue';
|
|
5
4
|
import { stopEvent } from '../../../utils/utils';
|
|
6
5
|
import GlFilteredSearchTokenSegment from './filtered_search_token_segment.vue';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import first from 'lodash
|
|
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
|
export const TERM_TOKEN_TYPE = 'filtered-search-term';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import uniqueId from 'lodash
|
|
3
|
-
import isBoolean from 'lodash/isBoolean';
|
|
2
|
+
import { uniqueId, isBoolean } from 'lodash-es';
|
|
4
3
|
import { looseEqual } from '../../../../vendor/bootstrap-vue/src/utils/loose-equal';
|
|
5
4
|
import { looseIndexOf } from '../../../../vendor/bootstrap-vue/src/utils/loose-index-of';
|
|
6
5
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import uniqueId from 'lodash
|
|
3
|
-
import isBoolean from 'lodash/isBoolean';
|
|
4
|
-
import omit from 'lodash/omit';
|
|
5
|
-
import pick from 'lodash/pick';
|
|
2
|
+
import { uniqueId, isBoolean, omit, pick } from 'lodash-es';
|
|
6
3
|
import { looseEqual } from '../../../../vendor/bootstrap-vue/src/utils/loose-equal';
|
|
7
4
|
import { formOptionsMixin } from '../../../../vendor/bootstrap-vue/src/mixins/form-options';
|
|
8
5
|
import { SafeHtmlDirective as SafeHtml } from '../../../../directives/safe_html/safe_html';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isFunction from 'lodash
|
|
3
|
-
import mapValues from 'lodash/mapValues';
|
|
4
|
-
import uniqueId from 'lodash/uniqueId';
|
|
2
|
+
import { isFunction, mapValues, uniqueId } from 'lodash-es';
|
|
5
3
|
import GlFormGroup from '../form_group/form_group.vue';
|
|
6
4
|
import GlFormInput from '../form_input/form_input.vue';
|
|
7
5
|
import { setObjectProperty } from '../../../../utils/set_utils';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isString from 'lodash
|
|
3
|
-
import isPlainObject from 'lodash/isPlainObject';
|
|
4
|
-
import { uniqueId } from 'lodash';
|
|
2
|
+
import { isString, isPlainObject, uniqueId } from 'lodash-es';
|
|
5
3
|
import { BFormGroup } from '../../../../vendor/bootstrap-vue/src/components/form-group/form-group';
|
|
6
4
|
|
|
7
5
|
export default {
|
|
@@ -1,3 +1,218 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
|
|
3
|
+
// Bootstrap v4.x does not have special styling for color input
|
|
4
|
+
// So we define some basic styles to compensate
|
|
5
|
+
input[type="color"].form-control {
|
|
6
|
+
height: $input-height;
|
|
7
|
+
// We use the smaller padding to make the color block larger
|
|
8
|
+
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
input[type="color"].form-control.form-control-sm,
|
|
12
|
+
.input-group-sm input[type="color"].form-control {
|
|
13
|
+
height: $input-height-sm;
|
|
14
|
+
// We use the smaller padding to make the color block larger
|
|
15
|
+
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
input[type="color"].form-control.form-control-lg,
|
|
19
|
+
.input-group-lg input[type="color"].form-control {
|
|
20
|
+
height: $input-height-lg;
|
|
21
|
+
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
input[type="color"].form-control:disabled {
|
|
25
|
+
// Disabled styling needs to be a bit different than regular inputs
|
|
26
|
+
background-color: $gl-color-neutral-500;
|
|
27
|
+
opacity: $btn-disabled-opacity;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// --- Base `.input-group > .custom-range` styling (no PR yet on Bootstrap v4) ---
|
|
31
|
+
.input-group {
|
|
32
|
+
> .custom-range {
|
|
33
|
+
position: relative;
|
|
34
|
+
flex: 1 1 auto;
|
|
35
|
+
width: 1%;
|
|
36
|
+
margin-bottom: 0;
|
|
37
|
+
|
|
38
|
+
+ .form-control,
|
|
39
|
+
+ .form-control-plaintext,
|
|
40
|
+
+ .custom-select,
|
|
41
|
+
+ .custom-range,
|
|
42
|
+
+ .custom-file {
|
|
43
|
+
margin-left: -$input-border-width;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> .form-control,
|
|
48
|
+
> .form-control-plaintext,
|
|
49
|
+
> .custom-select,
|
|
50
|
+
> .custom-range,
|
|
51
|
+
> .custom-file {
|
|
52
|
+
+ .custom-range {
|
|
53
|
+
margin-left: -$input-border-width;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
> .custom-range:focus {
|
|
58
|
+
z-index: 3;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
> .custom-range {
|
|
62
|
+
&:not(:last-child) {
|
|
63
|
+
@include border-right-radius(0);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:not(:first-child) {
|
|
67
|
+
@include border-left-radius(0);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
> .custom-range {
|
|
72
|
+
padding: 0 $input-padding-x;
|
|
73
|
+
background-color: $input-bg;
|
|
74
|
+
background-clip: padding-box;
|
|
75
|
+
border: $input-border-width solid $input-border-color;
|
|
76
|
+
height: $input-height;
|
|
77
|
+
|
|
78
|
+
@if $enable-rounded {
|
|
79
|
+
border-radius: $input-border-radius;
|
|
80
|
+
} @else {
|
|
81
|
+
border-radius: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@include box-shadow($input-box-shadow);
|
|
85
|
+
@include transition($input-transition);
|
|
86
|
+
// Bootstrap v4.3.2 has deprecated this mixin
|
|
87
|
+
// @include form-control-focus();
|
|
88
|
+
// So we manually add its content here
|
|
89
|
+
&:focus {
|
|
90
|
+
color: $input-focus-color; // only needed for fallback to text input
|
|
91
|
+
background-color: $input-focus-bg;
|
|
92
|
+
border-color: $input-focus-border-color;
|
|
93
|
+
outline: 0;
|
|
94
|
+
@if $enable-shadows {
|
|
95
|
+
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
|
96
|
+
} @else {
|
|
97
|
+
box-shadow: $input-focus-box-shadow;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:disabled,
|
|
102
|
+
&[readonly] {
|
|
103
|
+
background-color: $input-disabled-bg;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.input-group-lg > .custom-range {
|
|
109
|
+
height: $input-height-lg;
|
|
110
|
+
padding: 0 $input-padding-x-lg;
|
|
111
|
+
@include border-radius($input-border-radius-lg);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.input-group-sm > .custom-range {
|
|
115
|
+
height: $input-height-sm;
|
|
116
|
+
padding: 0 $input-padding-x-sm;
|
|
117
|
+
@include border-radius($input-border-radius-sm);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// <gl-form-input> custom-range validation styling
|
|
121
|
+
// Mixin for generating `.input-group .custom-range` validation styling
|
|
122
|
+
@mixin custom-range-validation-state($state, $color) {
|
|
123
|
+
.input-group .custom-range {
|
|
124
|
+
.was-validated &:#{$state},
|
|
125
|
+
&.is-#{$state} {
|
|
126
|
+
border-color: $color;
|
|
127
|
+
|
|
128
|
+
&:focus {
|
|
129
|
+
border-color: $color;
|
|
130
|
+
box-shadow: 0 0 0 $input-focus-width rgba($color, 0.25);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.custom-range {
|
|
136
|
+
.was-validated &:#{$state},
|
|
137
|
+
&.is-#{$state} {
|
|
138
|
+
// Pseudo-elements must be split across multiple rulesets to have an affect
|
|
139
|
+
&:focus {
|
|
140
|
+
&::-webkit-slider-thumb {
|
|
141
|
+
box-shadow:
|
|
142
|
+
0 0 0 1px $body-bg,
|
|
143
|
+
0 0 0 $input-btn-focus-width color.adjust($color, $lightness: 35%);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&::-moz-range-thumb {
|
|
147
|
+
box-shadow:
|
|
148
|
+
0 0 0 1px $body-bg,
|
|
149
|
+
0 0 0 $input-btn-focus-width color.adjust($color, $lightness: 35%);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&::-ms-thumb {
|
|
153
|
+
box-shadow:
|
|
154
|
+
0 0 0 1px $body-bg,
|
|
155
|
+
0 0 0 $input-btn-focus-width color.adjust($color, $lightness: 35%);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&::-webkit-slider-thumb {
|
|
160
|
+
background-color: $color;
|
|
161
|
+
background-image: none;
|
|
162
|
+
|
|
163
|
+
&:active {
|
|
164
|
+
background-color: color.adjust($color, $lightness: 35%);
|
|
165
|
+
background-image: none;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&::-webkit-slider-runnable-track {
|
|
170
|
+
background-color: rgba($color, 0.35);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&::-moz-range-thumb {
|
|
174
|
+
background-color: $color;
|
|
175
|
+
background-image: none;
|
|
176
|
+
|
|
177
|
+
&:active {
|
|
178
|
+
background-color: color.adjust($color, $lightness: 35%);
|
|
179
|
+
background-image: none;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&::-moz-range-track {
|
|
184
|
+
background: rgba($color, 0.35);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
~ .#{$state}-feedback,
|
|
188
|
+
~ .#{$state}-tooltip {
|
|
189
|
+
display: block;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&::-ms-thumb {
|
|
193
|
+
background-color: $color;
|
|
194
|
+
background-image: none;
|
|
195
|
+
|
|
196
|
+
&:active {
|
|
197
|
+
background-color: color.adjust($color, $lightness: 35%);
|
|
198
|
+
background-image: none;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&::-ms-track-lower {
|
|
203
|
+
background: rgba($color, 0.35);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&::-ms-track-upper {
|
|
207
|
+
background: rgba($color, 0.35);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@include custom-range-validation-state("valid", $form-feedback-valid-color);
|
|
214
|
+
@include custom-range-validation-state("invalid", $form-feedback-invalid-color);
|
|
215
|
+
|
|
1
216
|
.gl-form-input,
|
|
2
217
|
.gl-form-input.form-control {
|
|
3
218
|
appearance: none;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isObject from 'lodash
|
|
3
|
-
import uniqueId from 'lodash/uniqueId';
|
|
4
|
-
import isBoolean from 'lodash/isBoolean';
|
|
5
|
-
import toInteger from 'lodash/toInteger';
|
|
6
|
-
import toString from 'lodash/toString';
|
|
2
|
+
import { isObject, uniqueId, isBoolean, toInteger, toString } from 'lodash-es';
|
|
7
3
|
|
|
8
4
|
import { toFloat } from '../../../../utils/number_utils';
|
|
9
5
|
import { isVisible, stopEvent } from '../../../../utils/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import uniqueId from 'lodash
|
|
2
|
+
import { uniqueId } from 'lodash-es';
|
|
3
3
|
import { BFormTextarea } from '../../../../vendor/bootstrap-vue/src/components/form-textarea/form-textarea';
|
|
4
4
|
import GlFormCharacterCount from '../form_character_count/form_character_count.vue';
|
|
5
5
|
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isFunction from 'lodash
|
|
3
|
-
import isString from 'lodash/isString';
|
|
4
|
-
import isObject from 'lodash/isObject';
|
|
5
|
-
import toString from 'lodash/toString';
|
|
6
|
-
import isBoolean from 'lodash/isBoolean';
|
|
7
|
-
import concat from 'lodash/concat';
|
|
2
|
+
import { isFunction, isString, isObject, toString, isBoolean, concat } from 'lodash-es';
|
|
8
3
|
import { SafeLinkDirective, isExternalURL } from '../../../directives/safe_link/safe_link';
|
|
9
4
|
import { stopEvent } from '../../../utils/utils';
|
|
10
5
|
import { isEvent } from '../../../vendor/bootstrap-vue/src/utils/inspect';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
import isFunction from 'lodash
|
|
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) => item?.text?.length > 0 && !Array.isArray(item?.items);
|