@gitlab/ui 126.5.0 → 127.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.
- package/dist/components/base/alert/alert.js +0 -2
- package/dist/components/base/avatar/avatar.js +0 -2
- package/dist/components/base/badge/badge.js +0 -2
- package/dist/components/base/breadcrumb/breadcrumb.js +2 -10
- package/dist/components/base/button/button.js +0 -2
- package/dist/components/base/card/card.js +0 -2
- package/dist/components/base/collapse/collapse.js +0 -2
- package/dist/components/base/datepicker/datepicker.js +0 -2
- package/dist/components/base/drawer/drawer.js +0 -2
- package/dist/components/base/form/form.js +0 -2
- package/dist/components/base/icon/icon.js +0 -2
- package/dist/components/base/illustration/illustration.js +0 -2
- package/dist/components/base/label/label.js +0 -2
- package/dist/components/base/link/link.js +0 -2
- package/dist/components/base/markdown/markdown.js +0 -2
- package/dist/components/base/modal/modal.js +0 -2
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -2
- package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -2
- package/dist/components/base/pagination/pagination.js +1 -3
- package/dist/components/base/path/path.js +0 -2
- package/dist/components/base/popover/popover.js +0 -2
- package/dist/components/base/table/table.js +0 -2
- package/dist/components/base/tabs/tab/tab.js +0 -2
- package/dist/components/base/tabs/tabs/tabs.js +0 -2
- package/dist/components/base/toggle/toggle.js +0 -2
- package/dist/components/base/token/token.js +0 -2
- package/dist/components/base/tooltip/tooltip.js +0 -2
- package/dist/components/charts/area/area.js +15 -1
- package/dist/components/charts/bar/bar.js +0 -3
- package/dist/components/charts/chart/chart.js +0 -3
- package/dist/components/charts/column/column.js +0 -2
- package/dist/components/charts/gauge/gauge.js +0 -2
- package/dist/components/charts/heatmap/heatmap.js +0 -2
- package/dist/components/charts/legend/legend.js +0 -2
- package/dist/components/charts/line/line.js +17 -1
- package/dist/components/charts/shared/tooltip/tooltip.js +0 -2
- package/dist/components/charts/sparkline/sparkline.js +0 -3
- package/dist/components/dashboards/dashboard_layout/validators.js +5 -0
- package/dist/components/utilities/intersperse/intersperse.js +0 -2
- package/dist/components/utilities/sprintf/sprintf.js +1 -2
- package/dist/components/utilities/truncate/truncate.js +0 -2
- package/package.json +3 -3
- package/src/components/base/alert/alert.vue +0 -1
- package/src/components/base/avatar/avatar.vue +0 -1
- package/src/components/base/badge/badge.vue +0 -1
- package/src/components/base/breadcrumb/breadcrumb.vue +4 -9
- package/src/components/base/button/button.vue +0 -1
- package/src/components/base/card/card.vue +0 -1
- package/src/components/base/collapse/collapse.vue +0 -1
- package/src/components/base/datepicker/datepicker.vue +0 -1
- package/src/components/base/drawer/drawer.vue +0 -1
- package/src/components/base/dropdown/dropdown.vue +1 -1
- package/src/components/base/form/form.vue +0 -1
- package/src/components/base/icon/icon.vue +0 -1
- package/src/components/base/illustration/illustration.vue +0 -1
- package/src/components/base/label/label.vue +0 -1
- package/src/components/base/link/link.vue +0 -1
- package/src/components/base/markdown/markdown.vue +0 -1
- package/src/components/base/modal/modal.vue +0 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +0 -1
- package/src/components/base/new_dropdowns/listbox/listbox.vue +0 -1
- package/src/components/base/pagination/pagination.vue +1 -2
- package/src/components/base/path/path.vue +0 -1
- package/src/components/base/popover/popover.vue +0 -1
- package/src/components/base/table/table.vue +0 -1
- package/src/components/base/tabs/tab/tab.vue +0 -1
- package/src/components/base/tabs/tabs/tabs.vue +0 -1
- package/src/components/base/toggle/toggle.vue +0 -1
- package/src/components/base/token/token.vue +0 -1
- package/src/components/base/tooltip/tooltip.vue +0 -1
- package/src/components/charts/area/area.vue +0 -1
- package/src/components/charts/bar/bar.vue +0 -1
- package/src/components/charts/chart/chart.vue +0 -1
- package/src/components/charts/column/column.vue +0 -1
- package/src/components/charts/gauge/gauge.vue +0 -1
- package/src/components/charts/heatmap/heatmap.vue +0 -1
- package/src/components/charts/legend/legend.vue +0 -1
- package/src/components/charts/line/line.vue +0 -1
- package/src/components/charts/shared/tooltip/tooltip.vue +0 -1
- package/src/components/charts/sparkline/sparkline.vue +0 -1
- package/src/components/dashboards/dashboard_layout/validators.js +5 -0
- package/src/components/utilities/intersperse/intersperse.vue +0 -1
- package/src/components/utilities/sprintf/sprintf.vue +0 -1
- package/src/components/utilities/truncate/truncate.vue +0 -1
- package/tailwind.defaults.js +12 -0
|
@@ -4,8 +4,6 @@ import { getAvatarChar } from '../../../utils/string_utils';
|
|
|
4
4
|
import { avatarSizeValidator } from './utils';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
7
|
const IDENTICON_BG_COUNT = 7;
|
|
10
8
|
var script = {
|
|
11
9
|
name: 'GlAvatar',
|
|
@@ -4,8 +4,6 @@ import GlIcon from '../icon/icon';
|
|
|
4
4
|
import { logWarning } from '../../../utils/utils';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
7
|
const variantClass = {
|
|
10
8
|
[badgeVariantOptions.neutral]: 'badge-neutral',
|
|
11
9
|
[badgeVariantOptions.info]: 'badge-info',
|
|
@@ -8,8 +8,6 @@ import ClipboardButton from '../../shared_components/clipboard_button/clipboard_
|
|
|
8
8
|
import GlBreadcrumbItem from './breadcrumb_item';
|
|
9
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
|
|
13
11
|
var script = {
|
|
14
12
|
name: 'GlBreadcrumb',
|
|
15
13
|
components: {
|
|
@@ -36,7 +34,7 @@ var script = {
|
|
|
36
34
|
validator: items => {
|
|
37
35
|
return items.every(item => {
|
|
38
36
|
const keys = Object.keys(item);
|
|
39
|
-
return keys.includes('text') && (keys.includes('href') || keys.includes('to'));
|
|
37
|
+
return keys.includes('text') && item.text && (keys.includes('href') || keys.includes('to'));
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
40
|
},
|
|
@@ -230,12 +228,6 @@ var script = {
|
|
|
230
228
|
this.resizeObserver = null;
|
|
231
229
|
}
|
|
232
230
|
this.resetItems();
|
|
233
|
-
},
|
|
234
|
-
hideItemClass(item) {
|
|
235
|
-
// TODO once https://gitlab.com/gitlab-org/gitlab/-/issues/520089 is addressed:
|
|
236
|
-
// - Remove this hiding of empty breadcrumbs.
|
|
237
|
-
// - Tighten `items` validator to require non-empty `text`.
|
|
238
|
-
return !item.text ? 'gl-hidden' : '';
|
|
239
231
|
}
|
|
240
232
|
}
|
|
241
233
|
};
|
|
@@ -244,7 +236,7 @@ var script = {
|
|
|
244
236
|
const __vue_script__ = script;
|
|
245
237
|
|
|
246
238
|
/* template */
|
|
247
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-breadcrumbs",style:(_vm.breadcrumbStyle),attrs:{"aria-label":_vm.ariaLabel}},[_c('ol',_vm._g(_vm._b({staticClass:"gl-breadcrumb-list breadcrumb"},'ol',_vm.$attrs,false),_vm.$listeners),[(_vm.hasCollapsible || !_vm.resizeDone)?_c('li',{ref:"dropdown",class:("gl-breadcrumb-item gl-breadcrumb-item-" + _vm.size)},[_c('gl-disclosure-dropdown',{attrs:{"items":_vm.overflowingItems,"toggle-text":_vm.showMoreLabel,"fluid-width":"","text-sr-only":"","no-caret":"","icon":"ellipsis_h","size":_vm.dropdownSize}})],1):_vm._e(),_vm._v(" "),_vm._l((_vm.fittingItems),function(item,index){return _c('gl-breadcrumb-item',{key:index,ref:"breadcrumbs",refInFor:true,class:
|
|
239
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-breadcrumbs",style:(_vm.breadcrumbStyle),attrs:{"aria-label":_vm.ariaLabel}},[_c('ol',_vm._g(_vm._b({staticClass:"gl-breadcrumb-list breadcrumb"},'ol',_vm.$attrs,false),_vm.$listeners),[(_vm.hasCollapsible || !_vm.resizeDone)?_c('li',{ref:"dropdown",class:("gl-breadcrumb-item gl-breadcrumb-item-" + _vm.size)},[_c('gl-disclosure-dropdown',{attrs:{"items":_vm.overflowingItems,"toggle-text":_vm.showMoreLabel,"fluid-width":"","text-sr-only":"","no-caret":"","icon":"ellipsis_h","size":_vm.dropdownSize}})],1):_vm._e(),_vm._v(" "),_vm._l((_vm.fittingItems),function(item,index){return _c('gl-breadcrumb-item',{key:index,ref:"breadcrumbs",refInFor:true,class:_vm.itemClass,attrs:{"text":item.text,"href":item.href,"to":item.to,"size":_vm.size,"aria-current":_vm.getAriaCurrentAttr(index)},scopedSlots:_vm._u([{key:"default",fn:function(){return [(item.avatarPath)?_c('gl-avatar',{staticClass:"gl-breadcrumb-avatar-tile gl-border gl-mr-2 !gl-rounded-default",attrs:{"src":item.avatarPath,"size":_vm.avatarSize,"aria-hidden":"true","shape":"rect","data-testid":"avatar"}}):_vm._e(),_c('span',{staticClass:"gl-align-middle"},[_vm._v(_vm._s(item.text))])]},proxy:true}],null,true)})}),_vm._v(" "),(_vm.showClipboardButton)?_c('li',{staticClass:"gl-breadcrumb-clipboard-button"},[_c('clipboard-button',_vm._b({ref:"clipboardButton",staticClass:"gl-ml-2",attrs:{"data-testid":"copy-to-clipboard-button","text":_vm.clipboardButtonText,"size":_vm.dropdownSize}},'clipboard-button',_vm.clipboardTooltipText ? { title: _vm.clipboardTooltipText } : {},false))],1):_vm._e()],2)])};
|
|
248
240
|
var __vue_staticRenderFns__ = [];
|
|
249
241
|
|
|
250
242
|
/* style */
|
|
@@ -10,8 +10,6 @@ import { SPACE, ENTER } from '../new_dropdowns/constants';
|
|
|
10
10
|
import { glButtonConfig } from '../../../config';
|
|
11
11
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
12
12
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
13
|
var script = {
|
|
16
14
|
name: 'GlButton',
|
|
17
15
|
components: {
|
|
@@ -9,8 +9,6 @@ import GlIcon from '../icon/icon';
|
|
|
9
9
|
import { translate } from '../../../utils/i18n';
|
|
10
10
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
11
11
|
|
|
12
|
-
//
|
|
13
|
-
|
|
14
12
|
const pad = function (val) {
|
|
15
13
|
let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
16
14
|
return `0${val}`.slice(-len);
|
|
@@ -4,8 +4,6 @@ import { logWarning } from '../../../utils/utils';
|
|
|
4
4
|
import { iconSizeOptions, iconVariantOptions } from '../../../utils/constants';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
7
|
const knownIcons = new Set(iconsInfo.icons);
|
|
10
8
|
|
|
11
9
|
/** This is a re-usable vue component for rendering a svg sprite icon
|
|
@@ -3,8 +3,6 @@ import illustrationsInfo from '@gitlab/svgs/dist/illustrations.json';
|
|
|
3
3
|
import { logWarning } from '../../../utils/utils';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
6
|
const knownIllustrations = illustrationsInfo.icons;
|
|
9
7
|
|
|
10
8
|
/** This is a re-usable vue component for rendering a svg sprite icon
|
|
@@ -13,8 +13,6 @@ import { attemptFocus, attemptBlur } from '../../../vendor/bootstrap-vue/src/uti
|
|
|
13
13
|
import { linkVariantOptions, isVue3, linkVariantUnstyled, linkVariantInline, linkVariantMeta } from '../../../utils/constants';
|
|
14
14
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
|
|
18
16
|
const ANCHOR_TAG = 'a';
|
|
19
17
|
const NUXT_LINK_TAG = 'nuxt-link';
|
|
20
18
|
const VUE_ROUTER_LINK_TAG = 'router-link';
|
|
@@ -6,8 +6,6 @@ import CloseButton from '../../shared_components/close_button/close_button';
|
|
|
6
6
|
import GlButton from '../button/button';
|
|
7
7
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
8
|
|
|
9
|
-
//
|
|
10
|
-
|
|
11
9
|
function validatorHelper(obj) {
|
|
12
10
|
return Object.keys(obj).every(val => val === 'text' || val === 'attributes');
|
|
13
11
|
}
|
|
@@ -9,8 +9,6 @@ import GlDisclosureDropdownGroup from './disclosure_dropdown_group';
|
|
|
9
9
|
import { itemsValidator, hasOnlyListItems, isItem } from './utils';
|
|
10
10
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
11
11
|
|
|
12
|
-
//
|
|
13
|
-
|
|
14
12
|
const ITEM_SELECTOR = `.${ITEM_CLASS}`;
|
|
15
13
|
var script = {
|
|
16
14
|
name: 'GlDisclosureDropdown',
|
|
@@ -15,8 +15,6 @@ import GlListboxGroup from './listbox_group';
|
|
|
15
15
|
import { itemsValidator, isOption, flattenedOptions } from './utils';
|
|
16
16
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
17
17
|
|
|
18
|
-
//
|
|
19
|
-
|
|
20
18
|
const ITEM_SELECTOR = '[role="option"]';
|
|
21
19
|
const ITEM_NULL_KEY = Symbol('null-key');
|
|
22
20
|
const HEADER_ITEMS_BORDER_CLASSES = ['gl-border-b-1', 'gl-border-b-solid', 'gl-border-b-dropdown-divider'];
|
|
@@ -8,11 +8,9 @@ import GlIcon from '../icon/icon';
|
|
|
8
8
|
import GlLink from '../link/link';
|
|
9
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
|
|
13
11
|
const pageRange = (from, to) => range(from, to + 1, 1);
|
|
14
12
|
var script = {
|
|
15
|
-
name: '
|
|
13
|
+
name: 'GlPagination',
|
|
16
14
|
components: {
|
|
17
15
|
GlLink,
|
|
18
16
|
GlIcon
|
|
@@ -5,8 +5,6 @@ import { GlResizeObserverDirective } from '../../../directives/resize_observer/r
|
|
|
5
5
|
import GlIcon from '../icon/icon';
|
|
6
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
|
|
10
8
|
const BOUNDARY_WIDTH = 40;
|
|
11
9
|
const PATH_ITEM_CLASS = 'gl-path-button';
|
|
12
10
|
const PATH_ACTIVE_ITEM_CLASS = 'gl-path-active-item';
|
|
@@ -4,8 +4,6 @@ import CloseButton from '../../shared_components/close_button/close_button';
|
|
|
4
4
|
import { popoverPlacements } from '../../../utils/constants';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
7
|
const popoverRefName = 'bPopover';
|
|
10
8
|
var script = {
|
|
11
9
|
name: 'GlPopover',
|
|
@@ -3,8 +3,6 @@ import { isDev, logWarning } from '../../../utils/utils';
|
|
|
3
3
|
import { glTableLiteWarning, tableFullProps, tableFullSlots } from './constants';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
6
|
const shouldUseFullTable = _ref => {
|
|
9
7
|
let {
|
|
10
8
|
$attrs,
|
|
@@ -3,8 +3,6 @@ import { tabsButtonDefaults } from '../../../../utils/constants';
|
|
|
3
3
|
import GlButton from '../../button/button';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
6
|
const validatorHelper = obj => Object.keys(obj).every(val => val === 'text' || val === 'attributes');
|
|
9
7
|
var script = {
|
|
10
8
|
name: 'GlTabs',
|
|
@@ -3,8 +3,6 @@ import { translate } from '../../../utils/i18n';
|
|
|
3
3
|
import CloseButton from '../../shared_components/close_button/close_button';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
6
|
var script = {
|
|
9
7
|
name: 'GlToken',
|
|
10
8
|
components: {
|
|
@@ -4,8 +4,6 @@ import tooltipMixin from '../../mixins/tooltip_mixin';
|
|
|
4
4
|
import { getGlTooltipDefaultContainer } from '../../../directives/tooltip/container';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
7
|
const tooltipRefName = 'bvTooltip';
|
|
10
8
|
var script = {
|
|
11
9
|
name: 'GlTooltip',
|
|
@@ -8,7 +8,21 @@ import ChartLegend from '../legend/legend';
|
|
|
8
8
|
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
9
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Area charts as of %12.10 support annotations.
|
|
13
|
+
* Annotations is composed of a dotted line and an arrow
|
|
14
|
+
* at the bottom. The dotted line is constructed
|
|
15
|
+
* with markLine and arrows with markPoint.
|
|
16
|
+
*
|
|
17
|
+
* Similar to how custom tooltips are displayed when area chart
|
|
18
|
+
* is hovered, a tooltip should be displayed when the annotation
|
|
19
|
+
* arrow is hovered. This component adds event listeners
|
|
20
|
+
* to figure out if mouse is hovered on charts to show tooltips.
|
|
21
|
+
* While that works for data points inside the grid, for arrows
|
|
22
|
+
* that live right under the chart, we use eCharts inbuilt
|
|
23
|
+
* event listeners to detect hover. Given this limitation,
|
|
24
|
+
* we use a separate tooltip for data point and arrow.
|
|
25
|
+
*/
|
|
12
26
|
|
|
13
27
|
var script = {
|
|
14
28
|
name: 'GlAreaChart',
|
|
@@ -10,9 +10,6 @@ import ChartTooltip from '../shared/tooltip/tooltip';
|
|
|
10
10
|
import { stackedPresentationOptions } from '../../../utils/constants';
|
|
11
11
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
12
12
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
13
|
/**
|
|
17
14
|
* `nameGap` in charts/config is set to 50 but it is not
|
|
18
15
|
* used for bar charts as the axes are flipped. That is why
|
|
@@ -6,9 +6,6 @@ import { GlResizeObserverDirective } from '../../../directives/resize_observer/r
|
|
|
6
6
|
import { debounceByAnimationFrame } from '../../../utils/utils';
|
|
7
7
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
8
|
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* Allowed values by eCharts
|
|
14
11
|
* https://echarts.apache.org/en/api.html#echartsInstance.resize
|
|
@@ -5,8 +5,6 @@ import { gaugeSafeHues, gaugeWarningHue, gaugeNeutralHues } from '../../../utils
|
|
|
5
5
|
import Chart from '../chart/chart';
|
|
6
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
|
|
10
8
|
const AXIS_LABEL_FONT_SIZE_PX = 14;
|
|
11
9
|
const ARC_RADIUS = '80%';
|
|
12
10
|
const DETAIL_FONT_SIZE_PX = 30;
|
|
@@ -6,8 +6,6 @@ import GlTruncate from '../../utilities/truncate/truncate';
|
|
|
6
6
|
import GlChartSeriesLabel from '../series_label/series_label';
|
|
7
7
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
8
|
|
|
9
|
-
//
|
|
10
|
-
|
|
11
9
|
var script = {
|
|
12
10
|
name: 'GlChartLegend',
|
|
13
11
|
components: {
|
|
@@ -8,7 +8,23 @@ import ChartLegend from '../legend/legend';
|
|
|
8
8
|
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
9
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Line charts as of %12.10 support annotations.
|
|
13
|
+
* Annotations is composed of a dotted line and an arrow
|
|
14
|
+
* at the bottom. The dotted line is constructed
|
|
15
|
+
* with markLine and arrows with markPoint. Most of this
|
|
16
|
+
* logic is in GitLab and should be eventually moved to
|
|
17
|
+
* GitLab UI https://gitlab.com/gitlab-org/gitlab/-/issues/213390.
|
|
18
|
+
*
|
|
19
|
+
* Similar to how custom tooltips are displayed when line chart
|
|
20
|
+
* is hovered, a tooltip should be displayed when the annotation
|
|
21
|
+
* arrow is hovered. This component adds event listeners
|
|
22
|
+
* to figure out if mouse is hovered on charts to show tooltips.
|
|
23
|
+
* While that works for data points inside the grid, for arrows
|
|
24
|
+
* that live right under the chart, we use eCharts inbuilt
|
|
25
|
+
* event listeners to detect hover. Given this limitation,
|
|
26
|
+
* we use a separate tooltip for data point and arrow.
|
|
27
|
+
*/
|
|
12
28
|
|
|
13
29
|
var script = {
|
|
14
30
|
name: 'GlLineChart',
|
|
@@ -7,8 +7,6 @@ import { getTooltipAxisConfig, getTooltipTitle, getTooltipContent, getTooltipPar
|
|
|
7
7
|
import TooltipDefaultFormat from './tooltip_default_format/tooltip_default_format';
|
|
8
8
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
9
9
|
|
|
10
|
-
//
|
|
11
|
-
|
|
12
10
|
var script = {
|
|
13
11
|
name: 'GlChartTooltip',
|
|
14
12
|
components: {
|
|
@@ -8,9 +8,6 @@ import Chart from '../chart/chart';
|
|
|
8
8
|
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
9
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
11
|
// the padding is needed so the mark points don't overflow when visible
|
|
15
12
|
const gridPadding = symbolSize / 2;
|
|
16
13
|
const generateGradient = colors => {
|
|
@@ -2,6 +2,11 @@ const dashboardConfigValidator = config => {
|
|
|
2
2
|
if (config.panels) {
|
|
3
3
|
if (!Array.isArray(config.panels)) return false;
|
|
4
4
|
if (!config.panels.every(panel => panel.id && panel.gridAttributes)) return false;
|
|
5
|
+
|
|
6
|
+
// Validate that all panel IDs are unique
|
|
7
|
+
const panelIds = config.panels.map(panel => panel.id);
|
|
8
|
+
const uniquePanelIds = new Set(panelIds);
|
|
9
|
+
if (panelIds.length !== uniquePanelIds.size) return false;
|
|
5
10
|
}
|
|
6
11
|
return true;
|
|
7
12
|
};
|
|
@@ -6,8 +6,6 @@ import { insert, intersperse } from '../../../utils/data_utils';
|
|
|
6
6
|
import { isVnodeEmpty } from '../../../utils/is_slot_empty';
|
|
7
7
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
8
|
|
|
9
|
-
//
|
|
10
|
-
|
|
11
9
|
const filterEmptyNodesVue2 = filter(vNode => typeof vNode.tag === 'string' || vNode.text.trim() !== '');
|
|
12
10
|
const {
|
|
13
11
|
Fragment
|
|
@@ -2,8 +2,7 @@ import has from 'lodash/has';
|
|
|
2
2
|
import isString from 'lodash/isString';
|
|
3
3
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/* eslint-disable no-continue */
|
|
7
6
|
const PREFIX = '%{';
|
|
8
7
|
const SUFFIX = '}';
|
|
9
8
|
const START_SUFFIX = 'Start';
|
|
@@ -3,8 +3,6 @@ import { GlResizeObserverDirective } from '../../../directives/resize_observer/r
|
|
|
3
3
|
import { POSITION, ZERO_WIDTH_SPACE } from './constants';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
6
|
var script = {
|
|
9
7
|
name: 'GlTruncate',
|
|
10
8
|
POSITION,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "127.1.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"autoprefixer": "10.4.23",
|
|
132
132
|
"axe-playwright": "^2.2.2",
|
|
133
133
|
"babel-loader": "^9.2.1",
|
|
134
|
-
"cypress": "15.8.
|
|
134
|
+
"cypress": "15.8.2",
|
|
135
135
|
"cypress-real-events": "^1.15.0",
|
|
136
136
|
"dompurify": "^3.1.2",
|
|
137
137
|
"emoji-regex": "^10.6.0",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"start-server-and-test": "^2.1.3",
|
|
166
166
|
"storybook": "^7.6.20",
|
|
167
167
|
"storybook-dark-mode": "4.0.2",
|
|
168
|
-
"style-dictionary": "^5.1.
|
|
168
|
+
"style-dictionary": "^5.1.3",
|
|
169
169
|
"style-loader": "^4",
|
|
170
170
|
"tailwindcss": "3.4.19",
|
|
171
171
|
"vue": "2.7.16",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
1
|
<script>
|
|
3
2
|
import debounce from 'lodash/debounce';
|
|
4
3
|
import { translate } from '../../../utils/i18n';
|
|
@@ -32,7 +31,9 @@ export default {
|
|
|
32
31
|
validator: (items) => {
|
|
33
32
|
return items.every((item) => {
|
|
34
33
|
const keys = Object.keys(item);
|
|
35
|
-
return
|
|
34
|
+
return (
|
|
35
|
+
keys.includes('text') && item.text && (keys.includes('href') || keys.includes('to'))
|
|
36
|
+
);
|
|
36
37
|
});
|
|
37
38
|
},
|
|
38
39
|
},
|
|
@@ -233,12 +234,6 @@ export default {
|
|
|
233
234
|
}
|
|
234
235
|
this.resetItems();
|
|
235
236
|
},
|
|
236
|
-
hideItemClass(item) {
|
|
237
|
-
// TODO once https://gitlab.com/gitlab-org/gitlab/-/issues/520089 is addressed:
|
|
238
|
-
// - Remove this hiding of empty breadcrumbs.
|
|
239
|
-
// - Tighten `items` validator to require non-empty `text`.
|
|
240
|
-
return !item.text ? 'gl-hidden' : '';
|
|
241
|
-
},
|
|
242
237
|
},
|
|
243
238
|
};
|
|
244
239
|
</script>
|
|
@@ -270,7 +265,7 @@ export default {
|
|
|
270
265
|
:to="item.to"
|
|
271
266
|
:size="size"
|
|
272
267
|
:aria-current="getAriaCurrentAttr(index)"
|
|
273
|
-
:class="
|
|
268
|
+
:class="itemClass"
|
|
274
269
|
><template #default>
|
|
275
270
|
<gl-avatar
|
|
276
271
|
v-if="item.avatarPath"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
1
|
<script>
|
|
3
2
|
import debounce from 'lodash/debounce';
|
|
4
3
|
import isFunction from 'lodash/isFunction';
|
|
@@ -12,7 +11,7 @@ import GlLink from '../link/link.vue';
|
|
|
12
11
|
const pageRange = (from, to) => range(from, to + 1, 1);
|
|
13
12
|
|
|
14
13
|
export default {
|
|
15
|
-
name: '
|
|
14
|
+
name: 'GlPagination',
|
|
16
15
|
components: {
|
|
17
16
|
GlLink,
|
|
18
17
|
GlIcon,
|
|
@@ -2,6 +2,11 @@ export const dashboardConfigValidator = (config) => {
|
|
|
2
2
|
if (config.panels) {
|
|
3
3
|
if (!Array.isArray(config.panels)) return false;
|
|
4
4
|
if (!config.panels.every((panel) => panel.id && panel.gridAttributes)) return false;
|
|
5
|
+
|
|
6
|
+
// Validate that all panel IDs are unique
|
|
7
|
+
const panelIds = config.panels.map((panel) => panel.id);
|
|
8
|
+
const uniquePanelIds = new Set(panelIds);
|
|
9
|
+
if (panelIds.length !== uniquePanelIds.size) return false;
|
|
5
10
|
}
|
|
6
11
|
|
|
7
12
|
return true;
|
package/tailwind.defaults.js
CHANGED
|
@@ -44,6 +44,18 @@ function addCustomDefinitions({ addComponents, addUtilities }) {
|
|
|
44
44
|
'border-color': 'var(--gl-action-neutral-border-color-active)',
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
|
+
'.bg-action-neutral': {
|
|
48
|
+
'background-color': 'var(--gl-action-neutral-background-color-default)',
|
|
49
|
+
'&:hover': {
|
|
50
|
+
'background-color': 'var(--gl-action-neutral-background-color-hover)',
|
|
51
|
+
},
|
|
52
|
+
'&:focus': {
|
|
53
|
+
'background-color': 'var(--gl-action-neutral-background-color-focus)',
|
|
54
|
+
},
|
|
55
|
+
'&:active': {
|
|
56
|
+
'background-color': 'var(--gl-action-neutral-background-color-active)',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
47
59
|
'.animate-skeleton-loader': {
|
|
48
60
|
overflow: 'hidden',
|
|
49
61
|
'max-width': '32rem',
|