@gitlab/ui 119.1.0 → 120.0.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/badge/badge.js +1 -2
- package/dist/components/charts/bar/bar.js +14 -2
- package/dist/components/charts/single_stat/single_stat.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/figma/contextual.tokens.json +10 -5
- package/dist/tokens/json/tokens.dark.json +10 -0
- package/dist/tokens/json/tokens.json +10 -0
- package/dist/utils/constants.js +0 -1
- package/package.json +10 -10
- package/src/components/base/badge/badge.scss +17 -35
- package/src/components/base/badge/badge.vue +1 -2
- package/src/components/charts/bar/bar.vue +17 -2
- package/src/components/charts/single_stat/single_stat.vue +1 -1
- package/src/tokens/build/figma/contextual.tokens.json +10 -5
- package/src/tokens/build/json/tokens.dark.json +10 -0
- package/src/tokens/build/json/tokens.json +10 -0
- package/src/tokens/contextual/badge.tokens.json +10 -5
- package/src/utils/constants.js +0 -1
|
@@ -6,7 +6,6 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
const variantClass = {
|
|
9
|
-
[badgeVariantOptions.muted]: 'badge-muted',
|
|
10
9
|
[badgeVariantOptions.neutral]: 'badge-neutral',
|
|
11
10
|
[badgeVariantOptions.info]: 'badge-info',
|
|
12
11
|
[badgeVariantOptions.success]: 'badge-success',
|
|
@@ -26,7 +25,7 @@ var script = {
|
|
|
26
25
|
*/
|
|
27
26
|
variant: {
|
|
28
27
|
type: String,
|
|
29
|
-
default: badgeVariantOptions.
|
|
28
|
+
default: badgeVariantOptions.neutral,
|
|
30
29
|
validator(value) {
|
|
31
30
|
return badgeVariantOptions[value] !== undefined;
|
|
32
31
|
},
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
2
|
import truncate from 'lodash/truncate';
|
|
3
3
|
import { dataZoomAdjustments, mergeSeriesToOptions, grid } from '../../../utils/charts/config';
|
|
4
|
-
import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
4
|
+
import { CHART_DEFAULT_SERIES_STACK, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
5
5
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
6
6
|
import { engineeringNotation } from '../../../utils/number_utils';
|
|
7
7
|
import { hexToRgba } from '../../../utils/utils';
|
|
8
8
|
import TooltipDefaultFormat from '../shared/tooltip/tooltip_default_format/tooltip_default_format';
|
|
9
9
|
import Chart from '../chart/chart';
|
|
10
10
|
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
11
|
+
import { stackedPresentationOptions } from '../../../utils/constants';
|
|
11
12
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
12
13
|
|
|
13
14
|
//
|
|
@@ -96,6 +97,17 @@ var script = {
|
|
|
96
97
|
type: [Number, String],
|
|
97
98
|
required: false,
|
|
98
99
|
default: null
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* Controls how multiple series data are displayed in the chart –
|
|
103
|
+
* `stacked` stacks series horizontally, and
|
|
104
|
+
* `tiled` displays series as grouped bars.
|
|
105
|
+
*/
|
|
106
|
+
presentation: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: false,
|
|
109
|
+
default: stackedPresentationOptions.stacked,
|
|
110
|
+
validator: value => Object.values(stackedPresentationOptions).includes(value)
|
|
99
111
|
}
|
|
100
112
|
},
|
|
101
113
|
data() {
|
|
@@ -113,7 +125,7 @@ var script = {
|
|
|
113
125
|
name: key,
|
|
114
126
|
data: this.data[key],
|
|
115
127
|
type: 'bar',
|
|
116
|
-
stack:
|
|
128
|
+
stack: this.presentation === stackedPresentationOptions.tiled ? null : CHART_DEFAULT_SERIES_STACK,
|
|
117
129
|
itemStyle: {
|
|
118
130
|
color: hexToRgba(barColor, 0.2),
|
|
119
131
|
borderColor: barColor,
|