@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,7 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import debounce from 'lodash
|
|
3
|
-
import isFunction from 'lodash/isFunction';
|
|
4
|
-
import range from 'lodash/range';
|
|
2
|
+
import { debounce, isFunction, range } from 'lodash-es';
|
|
5
3
|
import { GlBreakpointInstance, breakpoints } from '../../../utils/breakpoints';
|
|
6
4
|
import { alignOptions, resizeDebounceTime } from '../../../utils/constants';
|
|
7
5
|
import { sprintf, translate } from '../../../utils/i18n';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import iconSpriteInfo from '@gitlab/svgs/dist/icons.json';
|
|
3
|
-
import uniqueId from 'lodash
|
|
4
|
-
import findLast from 'lodash/findLast';
|
|
3
|
+
import { uniqueId, findLast } from 'lodash-es';
|
|
5
4
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
6
5
|
import GlIcon from '../icon/icon.vue';
|
|
7
6
|
|
|
@@ -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 GlButton from '../button/button.vue';
|
|
5
5
|
import GlButtonGroup from '../button_group/button_group.vue';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import isPlainObject from 'lodash
|
|
2
|
+
import { isPlainObject } from 'lodash-es';
|
|
3
3
|
import { BTab } from '../../../../vendor/bootstrap-vue/src/components/tabs/tab';
|
|
4
4
|
import GlBadge from '../../badge/badge.vue';
|
|
5
5
|
import { logWarning } from '../../../../utils/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import debounce from 'lodash
|
|
2
|
+
import { debounce } from 'lodash-es';
|
|
3
3
|
import { GlResizeObserverDirective } from '../../../../directives/resize_observer/resize_observer';
|
|
4
4
|
import GlIcon from '../../icon/icon.vue';
|
|
5
5
|
import { translate } from '../../../../utils/i18n';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-default-export */
|
|
2
|
-
import isFunction from 'lodash
|
|
2
|
+
import { isFunction } from 'lodash-es';
|
|
3
3
|
// eslint-disable-next-line no-restricted-imports
|
|
4
4
|
import { ToastPlugin } from '../../../vendor/bootstrap-vue/src/components/toast/index';
|
|
5
5
|
import CloseButton from '../../shared_components/close_button/close_button.vue';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import merge from 'lodash
|
|
3
|
-
import truncate from 'lodash/truncate';
|
|
2
|
+
import { merge, truncate } from 'lodash-es';
|
|
4
3
|
import { grid, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
5
4
|
import { CHART_DEFAULT_SERIES_STACK, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
6
5
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import merge from 'lodash
|
|
3
|
-
import uniq from 'lodash/uniq';
|
|
4
|
-
import sortBy from 'lodash/sortBy';
|
|
2
|
+
import { merge, uniq, sortBy } from 'lodash-es';
|
|
5
3
|
import { gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue } from '../../../utils/charts/theme';
|
|
6
4
|
import Chart from '../chart/chart.vue';
|
|
7
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import merge from 'lodash
|
|
2
|
+
import { merge } from 'lodash-es';
|
|
3
3
|
import { GL_COLOR_NEUTRAL_0, GL_COLOR_NEUTRAL_100 } from '../../../tokens/build/js/tokens';
|
|
4
4
|
import { getTooltipTitle, getTooltipContent } from '../../../utils/charts/config';
|
|
5
5
|
import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import merge from 'lodash
|
|
3
|
-
import isNil from 'lodash/isNil';
|
|
2
|
+
import { merge, isNil } from 'lodash-es';
|
|
4
3
|
import { graphic } from 'echarts';
|
|
5
4
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
6
5
|
import {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import uniqueId from 'lodash
|
|
3
|
-
import isObject from 'lodash/isObject';
|
|
2
|
+
import { uniqueId, isObject } from 'lodash-es';
|
|
4
3
|
import GlDisclosureDropdown from '../../base/new_dropdowns/disclosure/disclosure_dropdown.vue';
|
|
5
4
|
import GlIcon from '../../base/icon/icon.vue';
|
|
6
5
|
import GlLoadingIcon from '../../base/loading_icon/loading_icon.vue';
|
|
@@ -7,7 +7,6 @@ $bv-enable-popover-variants: false;
|
|
|
7
7
|
@import "../vendor/bootstrap-vue/src/utilities.scss";
|
|
8
8
|
|
|
9
9
|
@import "../vendor/bootstrap-vue/src/components/dropdown/index.scss";
|
|
10
|
-
@import "../vendor/bootstrap-vue/src/components/form-input/index.scss";
|
|
11
10
|
@import "../vendor/bootstrap-vue/src/components/form-radio/index.scss";
|
|
12
11
|
@import "../vendor/bootstrap-vue/src/components/modal/index.scss";
|
|
13
12
|
@import "../vendor/bootstrap-vue/src/components/popover/index.scss";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import castArray from 'lodash
|
|
2
|
-
import merge from 'lodash/merge';
|
|
1
|
+
import { castArray, merge } 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/src/utils/i18n.js
CHANGED
package/src/utils/set_utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* global jest, beforeEach, afterEach */
|
|
2
2
|
/* eslint-disable class-methods-use-this, max-classes-per-file */
|
|
3
|
-
import isMatch from 'lodash
|
|
3
|
+
import { isMatch } from 'lodash-es';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* This class gives us a JSDom friendly DOM observer which we can manually trigger in tests
|
|
@@ -15,7 +15,7 @@ import { identity } from '../../../utils/identity'
|
|
|
15
15
|
import { isFunction, isString, isRegExp } from '../../../utils/inspect'
|
|
16
16
|
import { looseEqual } from '../../../utils/loose-equal'
|
|
17
17
|
import { toInteger } from '../../../utils/number'
|
|
18
|
-
import {
|
|
18
|
+
import { makeProp } from '../../../utils/props'
|
|
19
19
|
import { escapeRegExp } from '../../../utils/string'
|
|
20
20
|
import { warn } from '../../../utils/warn'
|
|
21
21
|
import { stringifyRecordValues } from './stringify-record-values'
|
|
@@ -78,7 +78,8 @@ export const filteringMixin = extend({
|
|
|
78
78
|
localFilterFn() {
|
|
79
79
|
// Return `null` to signal to use internal filter function
|
|
80
80
|
const { filterFunction } = this
|
|
81
|
-
|
|
81
|
+
// `filterFunction` is an optional Function prop with no default
|
|
82
|
+
return isFunction(filterFunction) ? filterFunction : null
|
|
82
83
|
},
|
|
83
84
|
// Returns the records in `localItems` that match the filter criteria
|
|
84
85
|
// Returns the original `localItems` array if not sorting
|
|
@@ -18,7 +18,8 @@ import { mathMax } from '../utils/math'
|
|
|
18
18
|
import { makeModelMixin } from '../utils/model'
|
|
19
19
|
import { toInteger, toFloat } from '../utils/number'
|
|
20
20
|
import { sortKeys } from '../utils/object'
|
|
21
|
-
import {
|
|
21
|
+
import { isFunction } from '../utils/inspect'
|
|
22
|
+
import { makeProp } from '../utils/props'
|
|
22
23
|
import { toString } from '../utils/string'
|
|
23
24
|
|
|
24
25
|
// --- Constants ---
|
|
@@ -93,7 +94,8 @@ export const formTextMixin = extend({
|
|
|
93
94
|
return mathMax(toInteger(this.debounce, 0), 0)
|
|
94
95
|
},
|
|
95
96
|
hasFormatter() {
|
|
96
|
-
|
|
97
|
+
// `formatter` is an optional Function prop with no default
|
|
98
|
+
return isFunction(this.formatter)
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
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 { isArray,
|
|
3
|
+
import { isArray, isObject, isUndefined } from './inspect'
|
|
6
4
|
import { clone, hasOwnProperty, keys } from './object'
|
|
7
5
|
import { upperFirst } from './string'
|
|
8
6
|
|
|
@@ -60,33 +58,3 @@ export const pluckProps = (keysToPluck, objToPluck, transformFn = identity) =>
|
|
|
60
58
|
memo[transformFn(prop)] = objToPluck[prop]
|
|
61
59
|
return memo
|
|
62
60
|
}, {})
|
|
63
|
-
|
|
64
|
-
// Make a prop object configurable by global configuration
|
|
65
|
-
// Replaces the current `default` key of each prop with a `getComponentConfig()`
|
|
66
|
-
// call that falls back to the current default value of the prop
|
|
67
|
-
export const makePropConfigurable = (prop, key, componentKey) => ({
|
|
68
|
-
...cloneDeep(prop),
|
|
69
|
-
default: function bvConfigurablePropDefault() {
|
|
70
|
-
const value = getComponentConfig(componentKey, key, prop.default)
|
|
71
|
-
return isFunction(value) ? value() : value
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
// Make a props object configurable by global configuration
|
|
76
|
-
// Replaces the current `default` key of each prop with a `getComponentConfig()`
|
|
77
|
-
// call that falls back to the current default value of the prop
|
|
78
|
-
export const makePropsConfigurable = (props, componentKey) =>
|
|
79
|
-
keys(props).reduce(
|
|
80
|
-
(result, key) => ({ ...result, [key]: makePropConfigurable(props[key], key, componentKey) }),
|
|
81
|
-
{}
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
// Get function name we use in `makePropConfigurable()`
|
|
85
|
-
// for the prop default value override to compare
|
|
86
|
-
// against in `hasPropFunction()`
|
|
87
|
-
const configurablePropDefaultFnName = makePropConfigurable({}, '', '').default.name
|
|
88
|
-
|
|
89
|
-
// Detect wether the given value is currently a function
|
|
90
|
-
// and isn't the props default function
|
|
91
|
-
export const hasPropFunction = fn =>
|
|
92
|
-
isFunction(fn) && fn.name && fn.name !== configurablePropDefaultFnName
|
package/tailwind.defaults.js
CHANGED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
|
|
3
|
-
// Temporary fix for cssnano bug: https://github.com/cssnano/cssnano/issues/712
|
|
4
|
-
// By moving center to last value in `background-position` property
|
|
5
|
-
// See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2599
|
|
6
|
-
@if $enable-validation-icons {
|
|
7
|
-
.form-control {
|
|
8
|
-
.was-validated &:invalid,
|
|
9
|
-
.was-validated &:valid,
|
|
10
|
-
&.is-invalid,
|
|
11
|
-
&.is-valid {
|
|
12
|
-
background-position: right $input-height-inner-quarter center;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Bootstrap v4.x does not have special styling for color input
|
|
18
|
-
// So we define some basic styles to compensate
|
|
19
|
-
input[type="color"].form-control {
|
|
20
|
-
height: $input-height;
|
|
21
|
-
// We use the smaller padding to make the color block larger
|
|
22
|
-
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
input[type="color"].form-control.form-control-sm,
|
|
26
|
-
.input-group-sm input[type="color"].form-control {
|
|
27
|
-
height: $input-height-sm;
|
|
28
|
-
// We use the smaller padding to make the color block larger
|
|
29
|
-
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
input[type="color"].form-control.form-control-lg,
|
|
33
|
-
.input-group-lg input[type="color"].form-control {
|
|
34
|
-
height: $input-height-lg;
|
|
35
|
-
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
input[type="color"].form-control:disabled {
|
|
39
|
-
// Disabled styling needs to be a bit different than regular inputs
|
|
40
|
-
background-color: $gray-500;
|
|
41
|
-
opacity: $btn-disabled-opacity;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// --- Base `.input-group > .custom-range` styling (no PR yet on Bootstrap v4) ---
|
|
45
|
-
.input-group {
|
|
46
|
-
> .custom-range {
|
|
47
|
-
position: relative;
|
|
48
|
-
flex: 1 1 auto;
|
|
49
|
-
width: 1%;
|
|
50
|
-
margin-bottom: 0;
|
|
51
|
-
|
|
52
|
-
+ .form-control,
|
|
53
|
-
+ .form-control-plaintext,
|
|
54
|
-
+ .custom-select,
|
|
55
|
-
+ .custom-range,
|
|
56
|
-
+ .custom-file {
|
|
57
|
-
margin-left: -$input-border-width;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
> .form-control,
|
|
62
|
-
> .form-control-plaintext,
|
|
63
|
-
> .custom-select,
|
|
64
|
-
> .custom-range,
|
|
65
|
-
> .custom-file {
|
|
66
|
-
+ .custom-range {
|
|
67
|
-
margin-left: -$input-border-width;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
> .custom-range:focus {
|
|
72
|
-
z-index: 3;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
> .custom-range {
|
|
76
|
-
&:not(:last-child) {
|
|
77
|
-
@include border-right-radius(0);
|
|
78
|
-
}
|
|
79
|
-
&:not(:first-child) {
|
|
80
|
-
@include border-left-radius(0);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
> .custom-range {
|
|
85
|
-
height: $input-height;
|
|
86
|
-
padding: 0 $input-padding-x;
|
|
87
|
-
background-color: $input-bg;
|
|
88
|
-
background-clip: padding-box;
|
|
89
|
-
border: $input-border-width solid $input-border-color;
|
|
90
|
-
height: $input-height;
|
|
91
|
-
|
|
92
|
-
@if $enable-rounded {
|
|
93
|
-
border-radius: $input-border-radius;
|
|
94
|
-
} @else {
|
|
95
|
-
border-radius: 0;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@include box-shadow($input-box-shadow);
|
|
99
|
-
@include transition($input-transition);
|
|
100
|
-
// Bootstrap v4.3.2 has deprecated this mixin
|
|
101
|
-
// @include form-control-focus();
|
|
102
|
-
// So we manually add its content here
|
|
103
|
-
&:focus {
|
|
104
|
-
color: $input-focus-color; // only needed for fallback to text input
|
|
105
|
-
background-color: $input-focus-bg;
|
|
106
|
-
border-color: $input-focus-border-color;
|
|
107
|
-
outline: 0;
|
|
108
|
-
@if $enable-shadows {
|
|
109
|
-
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
|
110
|
-
} @else {
|
|
111
|
-
box-shadow: $input-focus-box-shadow;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&:disabled,
|
|
116
|
-
&[readonly] {
|
|
117
|
-
background-color: $input-disabled-bg;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.input-group-lg > .custom-range {
|
|
123
|
-
height: $input-height-lg;
|
|
124
|
-
padding: 0 $input-padding-x-lg;
|
|
125
|
-
@include border-radius($input-border-radius-lg);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.input-group-sm > .custom-range {
|
|
129
|
-
height: $input-height-sm;
|
|
130
|
-
padding: 0 $input-padding-x-sm;
|
|
131
|
-
@include border-radius($input-border-radius-sm);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// --- <b-form-input>: custom-range validation styling - valid (no PR yet for Bootstrap v4.2) ---
|
|
135
|
-
// Mixin for generating `.input-group .custom-range` validation styling
|
|
136
|
-
@mixin bv-custom-range-validation-state($state, $color) {
|
|
137
|
-
.input-group .custom-range {
|
|
138
|
-
.was-validated &:#{$state},
|
|
139
|
-
&.is-#{$state} {
|
|
140
|
-
border-color: $color;
|
|
141
|
-
|
|
142
|
-
&:focus {
|
|
143
|
-
border-color: $color;
|
|
144
|
-
box-shadow: 0 0 0 $input-focus-width rgba($color, 0.25);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.custom-range {
|
|
150
|
-
.was-validated &:#{$state},
|
|
151
|
-
&.is-#{$state} {
|
|
152
|
-
// Pseudo-elements must be split across multiple rulesets to have an affect
|
|
153
|
-
&:focus {
|
|
154
|
-
&::-webkit-slider-thumb {
|
|
155
|
-
box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-btn-focus-width color.adjust($color, $lightness: 35%);
|
|
156
|
-
}
|
|
157
|
-
&::-moz-range-thumb {
|
|
158
|
-
box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-btn-focus-width color.adjust($color, $lightness: 35%);
|
|
159
|
-
}
|
|
160
|
-
&::-ms-thumb {
|
|
161
|
-
box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-btn-focus-width color.adjust($color, $lightness: 35%);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&::-webkit-slider-thumb {
|
|
166
|
-
background-color: $color;
|
|
167
|
-
background-image: none;
|
|
168
|
-
|
|
169
|
-
&:active {
|
|
170
|
-
background-color: color.adjust($color, $lightness: 35%);
|
|
171
|
-
background-image: none;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&::-webkit-slider-runnable-track {
|
|
176
|
-
background-color: rgba($color, 0.35);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&::-moz-range-thumb {
|
|
180
|
-
background-color: $color;
|
|
181
|
-
background-image: none;
|
|
182
|
-
|
|
183
|
-
&:active {
|
|
184
|
-
background-color: color.adjust($color, $lightness: 35%);
|
|
185
|
-
background-image: none;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&::-moz-range-track {
|
|
190
|
-
background: rgba($color, 0.35);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
~ .#{$state}-feedback,
|
|
194
|
-
~ .#{$state}-tooltip {
|
|
195
|
-
display: block;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&::-ms-thumb {
|
|
199
|
-
background-color: $color;
|
|
200
|
-
background-image: none;
|
|
201
|
-
|
|
202
|
-
&:active {
|
|
203
|
-
background-color: color.adjust($color, $lightness: 35%);
|
|
204
|
-
background-image: none;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
&::-ms-track-lower {
|
|
209
|
-
background: rgba($color, 0.35);
|
|
210
|
-
}
|
|
211
|
-
&::-ms-track-upper {
|
|
212
|
-
background: rgba($color, 0.35);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
@include bv-custom-range-validation-state("valid", $form-feedback-valid-color);
|
|
219
|
-
@include bv-custom-range-validation-state("invalid", $form-feedback-invalid-color);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "form-input";
|